Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions interactions/api/http/http_requests/interactions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TYPE_CHECKING, cast
from typing import TYPE_CHECKING, Sequence, cast

import discord_typings

Expand Down Expand Up @@ -84,7 +84,7 @@ async def get_application_commands(
)

async def overwrite_application_commands(
self, app_id: "Snowflake_Type", data: list[dict], guild_id: "Snowflake_Type"
self, app_id: "Snowflake_Type", data: Sequence[dict], guild_id: "Snowflake_Type"
) -> list[discord_typings.ApplicationCommandData]: # todo type "data"
"""
Take a list of commands and overwrite the existing command list within the given scope
Expand Down
16 changes: 8 additions & 8 deletions interactions/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,8 @@ async def wait_for_component(
self,
messages: Union[Message, int, list],
components: Union[
List[List[Union["BaseComponent", dict]]],
List[Union["BaseComponent", dict]],
Sequence[Sequence[Union["BaseComponent", dict]]],
Sequence[Union["BaseComponent", dict]],
"BaseComponent",
dict,
],
Expand All @@ -1179,8 +1179,8 @@ async def wait_for_component(
self,
*,
components: Union[
List[List[Union["BaseComponent", dict]]],
List[Union["BaseComponent", dict]],
Sequence[Sequence[Union["BaseComponent", dict]]],
Sequence[Union["BaseComponent", dict]],
"BaseComponent",
dict,
],
Expand All @@ -1193,8 +1193,8 @@ async def wait_for_component(
self,
messages: None,
components: Union[
List[List[Union["BaseComponent", dict]]],
List[Union["BaseComponent", dict]],
Sequence[Sequence[Union["BaseComponent", dict]]],
Sequence[Union["BaseComponent", dict]],
"BaseComponent",
dict,
],
Expand Down Expand Up @@ -1661,7 +1661,7 @@ async def sync_scope(
self,
cmd_scope: "Snowflake_Type",
delete_cmds: bool,
local_cmds_json: Dict["Snowflake_Type", List[Dict[str, Any]]],
local_cmds_json: Dict["Snowflake_Type", Sequence[Dict[str, Any]]],
) -> None:
"""
Sync a single scope.
Expand Down Expand Up @@ -1746,7 +1746,7 @@ def _build_sync_payload(
return sync_payload, sync_needed_flag

async def _sync_commands_with_discord(
self, sync_payload: List[Dict[str, Any]], cmd_scope: "Snowflake_Type"
self, sync_payload: Sequence[Dict[str, Any]], cmd_scope: "Snowflake_Type"
) -> None:
"""
Sync the commands with discord.
Expand Down