Working on bug in leaving

This commit is contained in:
Logan Cusano
2022-02-27 18:44:02 -05:00
parent 706f4a31df
commit 7682d8c72c
2 changed files with 11 additions and 5 deletions

6
bot.py
View File

@@ -119,12 +119,12 @@ class Bot(commands.Bot):
async def leave(ctx, member: discord.Member = None):
member = member or ctx.author.display_name
if self.Bot_Connected:
print("Disconnecting")
# Disconnect the client from the voice channel
await ctx.voice_client.disconnect()
print("Cleaning up")
# Stop the sound handlers
self.streamHandler.pause()
print("Disconnecting")
# Disconnect the client from the voice channel
await ctx.voice_client.disconnect()
print("Changing presence")
# Change the presence to away and '@ me'
await self.set_activity(False)