mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Post stats every 30m
This commit is contained in:
		@@ -78,7 +78,7 @@ class Titan(discord.AutoShardedClient):
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
        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))
 | 
				
			||||||
        await self.postStats()
 | 
					        self.loop.create_task(self.auto_post_stats())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async def on_message(self, message):
 | 
					    async def on_message(self, message):
 | 
				
			||||||
        await self.socketio.on_message(message)
 | 
					        await self.socketio.on_message(message)
 | 
				
			||||||
@@ -279,6 +279,11 @@ class Titan(discord.AutoShardedClient):
 | 
				
			|||||||
                return True
 | 
					                return True
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async def auto_post_stats(self):
 | 
				
			||||||
 | 
					        while not self.is_closed():
 | 
				
			||||||
 | 
					            await self.postStats()
 | 
				
			||||||
 | 
					            await asyncio.sleep(1800)
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
    async def postStats(self):
 | 
					    async def postStats(self):
 | 
				
			||||||
        count = len(self.guilds)
 | 
					        count = len(self.guilds)
 | 
				
			||||||
        shard_count = self.shard_count
 | 
					        shard_count = self.shard_count
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user