Post stats before indexing all servers

This commit is contained in:
Jeremy Zhang 2018-01-05 10:00:24 +00:00
parent 173a9a4861
commit 4ae37fa854

View File

@ -73,6 +73,9 @@ class Titan(discord.Client):
await self.logout() await self.logout()
return return
self.discordBotsOrg = DiscordBotsOrg(self.user.id, config.get("discord-bots-org-token", None))
await self.discordBotsOrg.post(len(self.servers))
if "no-init" not in sys.argv: if "no-init" not in sys.argv:
for server in self.servers: for server in self.servers:
await self.database.update_guild(server) await self.database.update_guild(server)
@ -95,9 +98,6 @@ class Titan(discord.Client):
else: else:
print("Skipping indexing server due to no-init flag") print("Skipping indexing server due to no-init flag")
self.discordBotsOrg = DiscordBotsOrg(self.user.id, config.get("discord-bots-org-token", None))
await self.discordBotsOrg.post(len(self.servers))
async def on_message(self, message): async def on_message(self, message):
await self.database.push_message(message) await self.database.push_message(message)
await self.socketio.on_message(message) await self.socketio.on_message(message)