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:
Rapptz 2022-05-05 01:29:51 -04:00
parent ccc737eb07
commit d8846570ae

View File

@ -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'))