diff options
| author | Rapptz <[email protected]> | 2020-01-25 03:29:14 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-01-25 03:29:14 -0500 |
| commit | 0033cc83ef1feff952e8eaafc066fe78b9ce991d (patch) | |
| tree | 11fa2fc993d79013014e3bb82a105092f07c9a27 | |
| parent | Remove extra backtick in CustomActivity docs (diff) | |
| download | discord.py-0033cc83ef1feff952e8eaafc066fe78b9ce991d.tar.xz discord.py-0033cc83ef1feff952e8eaafc066fe78b9ce991d.zip | |
Fix fetching invites on guilds the user is not in
| -rw-r--r-- | discord/invite.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/invite.py b/discord/invite.py index 51244d0e..cfbbdf72 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -296,7 +296,7 @@ class Invite(Hashable): channel_id = int(channel_data['id']) channel_type = try_enum(ChannelType, channel_data['type']) channel = PartialInviteChannel(id=channel_id, name=channel_data['name'], type=channel_type) - if guild is not None: + if guild is not None and not isinstance(guild, PartialInviteGuild): # Upgrade the partial data if applicable channel = guild.get_channel(channel_id) or channel |