mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-03 23:37:09 +01:00 
			
		
		
		
	Update bot.py
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							2f8b5fd820
						
					
				
				
					commit
					3e251a2bc4
				
			@@ -16,6 +16,7 @@ import json
 | 
				
			|||||||
#     raven_client = RavenClient(config["sentry-dsn"])
 | 
					#     raven_client = RavenClient(config["sentry-dsn"])
 | 
				
			||||||
# except raven.exceptions.InvalidDsn:
 | 
					# except raven.exceptions.InvalidDsn:
 | 
				
			||||||
#     pass
 | 
					#     pass
 | 
				
			||||||
 | 
					import traceback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
intents = discord.Intents.default()
 | 
					intents = discord.Intents.default()
 | 
				
			||||||
intents.members = True
 | 
					intents.members = True
 | 
				
			||||||
@@ -84,6 +85,15 @@ class Titan(discord.AutoShardedClient):
 | 
				
			|||||||
        self.botsDiscordPw = BotsDiscordPw(self.user.id, config.get("bots-discord-pw-token", None))
 | 
					        self.botsDiscordPw = BotsDiscordPw(self.user.id, config.get("bots-discord-pw-token", None))
 | 
				
			||||||
        self.loop.create_task(self.auto_post_stats())
 | 
					        self.loop.create_task(self.auto_post_stats())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async def on_socket_raw_send(self, data):
 | 
				
			||||||
 | 
					        data = str(data)
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            data = json.loads(data)
 | 
				
			||||||
 | 
					        except:
 | 
				
			||||||
 | 
					            return
 | 
				
			||||||
 | 
					        logging.info('DEBUG LOG {}'.format(data.get("op", -1)))
 | 
				
			||||||
 | 
					        logging.info('{}'.format(str(list(traceback.format_stack()))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async def on_message(self, message):
 | 
					    async def on_message(self, message):
 | 
				
			||||||
        await self.socketio.on_message(message)
 | 
					        await self.socketio.on_message(message)
 | 
				
			||||||
        await self.redisqueue.push_message(message)
 | 
					        await self.redisqueue.push_message(message)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user