From 29c1d8bfdadf89039f1f1abc6c057f6ad6abc3e3 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Tue, 5 Mar 2019 19:49:08 +0000 Subject: [PATCH] Use discord game status immediately after logging in --- discordbot/titanembeds/bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discordbot/titanembeds/bot.py b/discordbot/titanembeds/bot.py index acdff1a..2035b6c 100644 --- a/discordbot/titanembeds/bot.py +++ b/discordbot/titanembeds/bot.py @@ -28,7 +28,10 @@ except AttributeError: class Titan(discord.AutoShardedClient): def __init__(self): - super().__init__(max_messages=10000) + super().__init__( + max_messages=10000, + activity=discord.Game(name="Embed your Discord server! Visit https://TitanEmbeds.com/") + ) self.aiosession = aiohttp.ClientSession(loop=self.loop) self.http.user_agent += ' TitanEmbeds-Bot' self.redisqueue = RedisQueue(self, config["redis-uri"]) @@ -80,9 +83,6 @@ class Titan(discord.AutoShardedClient): print("Shard count: " + str(self.shard_count)) print("------") - game = discord.Game(name="Embed your Discord server! Visit https://TitanEmbeds.com/") - await self.change_presence(status=discord.Status.online, activity=game) - self.discordBotsOrg = DiscordBotsOrg(self.user.id, config.get("discord-bots-org-token", None)) self.botsDiscordPw = BotsDiscordPw(self.user.id, config.get("bots-discord-pw-token", None)) await self.postStats()