aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStocker <[email protected]>2021-08-23 21:03:56 -0400
committerGitHub <[email protected]>2021-08-23 21:03:56 -0400
commitae01a96bef2486fca3e1c30bc340e7cbc2ea0019 (patch)
tree869a78671cd5c82205b82ffd9bc7de7fd62612fb
parentMake getters in Client positional only (diff)
downloaddiscord.py-ae01a96bef2486fca3e1c30bc340e7cbc2ea0019.tar.xz
discord.py-ae01a96bef2486fca3e1c30bc340e7cbc2ea0019.zip
Add missing type: ignore and missing typehint to channel.py
-rw-r--r--discord/channel.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 47e2c113..dac15aaf 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -86,6 +86,7 @@ if TYPE_CHECKING:
StoreChannel as StoreChannelPayload,
GroupDMChannel as GroupChannelPayload,
)
+ from .types.snowflake import SnowflakeList
async def _single_delete_strategy(messages: Iterable[Message]):
@@ -392,7 +393,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
if len(messages) > 100:
raise ClientException('Can only bulk delete messages up to 100 messages')
- message_ids: List[int] = [m.id for m in messages]
+ message_ids: SnowflakeList = [m.id for m in messages]
await self._state.http.delete_messages(self.id, message_ids)
async def purge(
@@ -1709,6 +1710,7 @@ class DMChannel(discord.abc.Messageable, Hashable):
self._state = state
self.id = channel_id
self.recipient = None
+ # state.user won't be None here
self.me = state.user # type: ignore
return self