mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-03 23:37:09 +01:00 
			
		
		
		
	Allow the bot to work with not having Administrator permissions (#47)
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							21400679b6
						
					
				
				
					commit
					600627d2e2
				
			@@ -98,7 +98,10 @@ class DatabaseInterface(object):
 | 
			
		||||
                        session.commit()
 | 
			
		||||
 | 
			
		||||
    async def update_guild(self, guild):
 | 
			
		||||
        server_webhooks = await self.bot.get_server_webhooks(guild)
 | 
			
		||||
        if guild.me.server_permissions.manage_webhooks:
 | 
			
		||||
            server_webhooks = await self.bot.get_server_webhooks(guild)
 | 
			
		||||
        else:
 | 
			
		||||
            server_webhooks = []
 | 
			
		||||
        async with threadpool():
 | 
			
		||||
            with self.get_session() as session:
 | 
			
		||||
                gui = session.query(Guilds).filter(Guilds.guild_id == guild.id).first()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user