Push message first before hitting the database

This commit is contained in:
Jeremy Zhang 2018-02-16 20:54:06 +00:00
parent eaef3d53d8
commit 076870763e

View File

@ -101,8 +101,8 @@ class Titan(discord.Client):
# print("Skipping indexing server due to no-init flag") # print("Skipping indexing server due to no-init flag")
async def on_message(self, message): async def on_message(self, message):
await self.database.push_message(message)
await self.socketio.on_message(message) await self.socketio.on_message(message)
await self.database.push_message(message)
msg_arr = message.content.split() # split the message msg_arr = message.content.split() # split the message
if len(message.content.split()) > 1 and message.server: #making sure there is actually stuff in the message and have arguments and check if it is sent in server (not PM) if len(message.content.split()) > 1 and message.server: #making sure there is actually stuff in the message and have arguments and check if it is sent in server (not PM)