Revert "Remove messages table", Accidentally committed in dev code

This reverts commit 6d6b390431.
This commit is contained in:
Jeremy Zhang
2018-07-16 23:43:41 +00:00
parent 6d6b390431
commit 89b12d06ab
10 changed files with 152 additions and 73 deletions

View File

@ -81,6 +81,7 @@ class Titan(discord.AutoShardedClient):
async def on_message(self, message):
await self.socketio.on_message(message)
await self.database.push_message(message)
await self.redisqueue.push_message(message)
msg_arr = message.content.split() # split the message
@ -95,11 +96,13 @@ class Titan(discord.AutoShardedClient):
await getattr(self.command, msg_cmd)(message) #actually run cmd, passing in msg obj
async def on_message_edit(self, message_before, message_after):
await self.database.update_message(message_after)
await self.redisqueue.update_message(message_after)
await self.socketio.on_message_update(message_after)
async def on_message_delete(self, message):
self.delete_list.append(message.id)
await self.database.delete_message(message)
await self.redisqueue.delete_message(message)
await self.socketio.on_message_delete(message)