Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
FlamesC0der committed Dec 10, 2023
1 parent d9801d9 commit 16e6871
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cogs/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ def format_length(milliseconds):
)
embed.set_author(name=interaction.user.display_name, icon_url=interaction.user.avatar.url)
await interaction.channel.send(embed=embed)


@play.error
async def play_error(self, interaction, error):
await interaction.response.send_message(embed=discord.Embed(description="Failed to load song!", color=0xad1457), ephemeral=True)

@app_commands.command(name="leave", description="Leave voice channel")
@app_commands.guild_only()
async def leave(self, interaction: discord.Integration):
Expand Down Expand Up @@ -144,13 +148,9 @@ async def on_voice_state_update(self, member, before, after):
if len(vc.channel.members) == 1:
await vc.stop()
await vc.disconnect()

@play.error
async def play_error(self, interaction, error):
await interaction.response.send_message(embed=discord.Embed(description="Failed to load song!", color=0xad1457), ephemeral=True)


async def setup(bot: commands.Bot):
async def setup(bot: commands.Bot):
music_bot = Music_player(bot)
await bot.add_cog(music_bot)
await music_bot.setup()

0 comments on commit 16e6871

Please # to comment.