mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Dont read messages if the channel has no permissions
This commit is contained in:
		@@ -103,6 +103,8 @@ class RedisQueue:
 | 
			
		||||
            return
 | 
			
		||||
        await self.connection.delete([key])
 | 
			
		||||
        messages = []
 | 
			
		||||
        me = channel.guild.get_member(self.bot.user.id)
 | 
			
		||||
        if channel.permissions_for(me).read_messages:
 | 
			
		||||
            async for message in channel.history(limit=50):
 | 
			
		||||
                formatted = get_formatted_message(message)
 | 
			
		||||
                messages.append(json.dumps(formatted, separators=(',', ':')))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user