aboutsummaryrefslogtreecommitdiff
path: root/code/cogs
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-05-13 16:27:56 -0500
committerParker <contact@pkrm.dev>2024-05-13 16:27:56 -0500
commit538c28244f4a72248ad30151791e2d93e80274e8 (patch)
treead37b781b9cefc3bce53c36dce4796cf43497efc /code/cogs
parent5691d2f058746c4a381b5debfea517364ea444f8 (diff)
Catch error when attempting to remove autoplay
Diffstat (limited to 'code/cogs')
-rw-r--r--code/cogs/stop.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/code/cogs/stop.py b/code/cogs/stop.py
index 2bb52aa..0b67a30 100644
--- a/code/cogs/stop.py
+++ b/code/cogs/stop.py
@@ -17,7 +17,10 @@ class Stop(commands.Cog):
"Disconnects the bot from the voice channel and clears the queue"
player = self.bot.lavalink.player_manager.get(interaction.guild.id)
- self.bot.autoplay.remove(interaction.guild.id)
+ try:
+ self.bot.autoplay.remove(interaction.guild.id)
+ except ValueError:
+ pass
player.queue.clear()
await player.stop()
await interaction.guild.voice_client.disconnect(force=True)