async def on_ready(self): print('Titan [DiscordBot]') print('Logged in as the following user:'******'------') 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) try: self.database.connect(config["database-uri"]) except Exception: self.logger.error("Unable to connect to specified database!") traceback.print_exc() await self.logout() return 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()
async def on_ready(self): print('Titan [DiscordBot]') print('Logged in as the following user:'******'------') print("Shard count: " + str(self.shard_count)) print("------") 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()
async def on_ready(self): print('Titan [DiscordBot]') print('Logged in as the following user:'******'------') 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()
async def on_shard_ready(self, shard_id): logging.info('Titan [DiscordBot]') logging.info('Logged in as the following user:'******'------') logging.info("Shard count: " + str(self.shard_count)) logging.info("Shard id: " + str(shard_id)) logging.info("------") self.loop.create_task(self.redisqueue.subscribe()) 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)) self.loop.create_task(self.auto_post_stats())