mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 17:06:21 +00:00
Remove unnecessary type ignore
Despite this except branch is no longer guarded, the exceptional case could still happen if an Object is passed or if a future channel type leads to breakage
This commit is contained in:
@ -1422,7 +1422,7 @@ class Message(PartialMessage, Hashable):
|
||||
|
||||
try:
|
||||
# if the channel doesn't have a guild attribute, we handle that
|
||||
self.guild = channel.guild # type: ignore
|
||||
self.guild = channel.guild
|
||||
except AttributeError:
|
||||
self.guild = state._get_guild(utils._get_as_snowflake(data, 'guild_id'))
|
||||
|
||||
|
Reference in New Issue
Block a user