1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Try to find out the cause of the ghost bot appearences

This commit is contained in:
Steffo 2019-02-28 17:22:49 +01:00
parent f6d8b14bba
commit 73073ad858

View file

@ -802,11 +802,13 @@ class RoyalDiscordBot(discord.Client):
self.inactivity_timer -= 1 self.inactivity_timer -= 1
continue continue
for voice_client in self.voice_clients: for voice_client in self.voice_clients:
if voice_client.is_connected(): try:
logger.info("Disconnecting due to inactivity.") logger.info("Disconnecting due to inactivity.")
await voice_client.disconnect() await voice_client.disconnect()
await self.change_presence(status=discord.Status.online, activity=None) await self.change_presence(status=discord.Status.online, activity=None)
await self.main_channel.send("💤 Mi sono disconnesso dalla cv per inattività.") await self.main_channel.send("💤 Mi sono disconnesso dalla cv per inattività.")
except Exception:
raise Exception("Ciao! Sono un errore intenzionale di Steffo per testare il countdown inattività!")
async def create_activityreport(self): async def create_activityreport(self):
logger.debug("Fetching Discord users...") logger.debug("Fetching Discord users...")