mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
Update bot.py
This commit is contained in:
parent
2f8b5fd820
commit
3e251a2bc4
@ -16,6 +16,7 @@ import json
|
||||
# raven_client = RavenClient(config["sentry-dsn"])
|
||||
# except raven.exceptions.InvalidDsn:
|
||||
# pass
|
||||
import traceback
|
||||
|
||||
intents = discord.Intents.default()
|
||||
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.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):
|
||||
await self.socketio.on_message(message)
|
||||
await self.redisqueue.push_message(message)
|
||||
|
Loading…
Reference in New Issue
Block a user