mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-07 10:31:59 +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:
parent
ccc737eb07
commit
d8846570ae
@ -1422,7 +1422,7 @@ class Message(PartialMessage, Hashable):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# if the channel doesn't have a guild attribute, we handle that
|
# if the channel doesn't have a guild attribute, we handle that
|
||||||
self.guild = channel.guild # type: ignore
|
self.guild = channel.guild
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.guild = state._get_guild(utils._get_as_snowflake(data, 'guild_id'))
|
self.guild = state._get_guild(utils._get_as_snowflake(data, 'guild_id'))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user