mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-11-04 07:22:50 +00:00 
			
		
		
		
	Fix fetching invites on guilds the user is not in
This commit is contained in:
		@@ -296,7 +296,7 @@ class Invite(Hashable):
 | 
				
			|||||||
        channel_id = int(channel_data['id'])
 | 
					        channel_id = int(channel_data['id'])
 | 
				
			||||||
        channel_type = try_enum(ChannelType, channel_data['type'])
 | 
					        channel_type = try_enum(ChannelType, channel_data['type'])
 | 
				
			||||||
        channel = PartialInviteChannel(id=channel_id, name=channel_data['name'], type=channel_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
 | 
					            # Upgrade the partial data if applicable
 | 
				
			||||||
            channel = guild.get_channel(channel_id) or channel
 | 
					            channel = guild.get_channel(channel_id) or channel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user