Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jotonedev committed Oct 26, 2023
1 parent 1dcf803 commit 4cbf1bc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions dsmusic/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

import discord
import mafic
from mafic import NodeAlreadyConnected
from discord import app_commands
from discord.ext import commands

__all__ = [
"Client"
]

from mafic import NodeAlreadyConnected

logger = logging.getLogger('discord.dsbot')

Expand Down Expand Up @@ -90,12 +90,5 @@ async def on_tree_error(interaction: discord.Interaction, error: app_commands.Ap
f"You are currently on cooldown! Try again in **{error.retry_after:.2f}** seconds!", ephemeral=True)
elif isinstance(error, app_commands.MissingPermissions):
return await interaction.response.send_message(f"You are not authorized to use that", ephemeral=True)
elif isinstance(error, NoNodesAvailable):
for node in self.pool.nodes:
try:
await node.connect()
except NodeAlreadyConnected:
pass
return await interaction.response.send_message("No nodes available", ephemeral=True)
else:
logger.error(error)

0 comments on commit 4cbf1bc

Please sign in to comment.