mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Upgrade Message.guild references if None in Interaction
This commit is contained in:
parent
064cbd1125
commit
bb7668f8a5
@ -195,6 +195,11 @@ class Interaction(Generic[ClientT]):
|
||||
|
||||
if self.guild_id:
|
||||
guild = self._state._get_or_create_unavailable_guild(self.guild_id)
|
||||
|
||||
# Upgrade Message.guild in case it's missing with partial guild data
|
||||
if self.message is not None and self.message.guild is None:
|
||||
self.message.guild = guild
|
||||
|
||||
try:
|
||||
member = data['member'] # type: ignore # The key is optional and handled
|
||||
except KeyError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user