diff --git a/discord/commands/permissions.py b/discord/commands/permissions.py index 49f3a08901..dc5b34a2d4 100644 --- a/discord/commands/permissions.py +++ b/discord/commands/permissions.py @@ -24,6 +24,7 @@ """ from typing import Callable, Dict, Union + from ..permissions import Permissions from .core import ApplicationCommand diff --git a/discord/enums.py b/discord/enums.py index 9066b77d7a..9920d70a86 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -700,8 +700,11 @@ def from_datatype(cls, datatype): return cls.number from .commands.context import ApplicationContext + if not issubclass(datatype, ApplicationContext): # TODO: prevent ctx being passed here in cog commands - raise TypeError(f"Invalid class {datatype} used as an input type for an Option") # TODO: Improve the error message + raise TypeError( + f"Invalid class {datatype} used as an input type for an Option" + ) # TODO: Improve the error message class EmbeddedActivity(Enum): diff --git a/discord/http.py b/discord/http.py index 8d8dae8697..e0b5352c09 100644 --- a/discord/http.py +++ b/discord/http.py @@ -2240,7 +2240,7 @@ def bulk_upsert_guild_commands( return self.request(r, json=payload) # Application commands (permissions) - + def get_command_permissions( self, application_id: Snowflake, @@ -2254,7 +2254,7 @@ def get_command_permissions( guild_id=guild_id, ) return self.request(r) - + def get_guild_command_permissions( self, application_id: Snowflake, @@ -2267,7 +2267,7 @@ def get_guild_command_permissions( guild_id=guild_id, ) return self.request(r) - + # Interaction responses def _edit_webhook_helper( diff --git a/discord/state.py b/discord/state.py index 0226351e73..c1571d9255 100644 --- a/discord/state.py +++ b/discord/state.py @@ -1576,7 +1576,6 @@ def parse_voice_state_update(self, data) -> None: coro = voice.on_voice_state_update(data) asyncio.create_task(logging_coroutine(coro, info="Voice Protocol voice state update handler")) - def parse_voice_server_update(self, data) -> None: try: key_id = int(data["guild_id"])