mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-03 23:37:09 +01:00 
			
		
		
		
	Subscribe to redis in start
This commit is contained in:
		@@ -54,6 +54,7 @@ class Titan(discord.AutoShardedClient):
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    async def start(self):
 | 
					    async def start(self):
 | 
				
			||||||
        await self.redisqueue.connect()
 | 
					        await self.redisqueue.connect()
 | 
				
			||||||
 | 
					        self.loop.create_task(self.redisqueue.subscribe())
 | 
				
			||||||
        await super().start(config["bot-token"])
 | 
					        await super().start(config["bot-token"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async def on_shard_ready(self, shard_id):
 | 
					    async def on_shard_ready(self, shard_id):
 | 
				
			||||||
@@ -65,7 +66,6 @@ class Titan(discord.AutoShardedClient):
 | 
				
			|||||||
        print("Shard count: " + str(self.shard_count))
 | 
					        print("Shard count: " + str(self.shard_count))
 | 
				
			||||||
        print("Shard id: "+ str(shard_id))
 | 
					        print("Shard id: "+ str(shard_id))
 | 
				
			||||||
        print("------")
 | 
					        print("------")
 | 
				
			||||||
        self.loop.create_task(self.redisqueue.subscribe())
 | 
					 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        self.discordBotsOrg = DiscordBotsOrg(self.user.id, config.get("discord-bots-org-token", None))
 | 
					        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.botsDiscordPw = BotsDiscordPw(self.user.id, config.get("bots-discord-pw-token", None))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user