fix: naprawa działania pętli utworu - wyłączanie pętli pojedynczego utworu przy ręcznym pominięciu (/skip, przycisk w web)
This commit is contained in:
2 files changed
+8
-1
No files matched your search
@@ -444,7 +444,10 @@ class MusicBot(commands.Cog):
|
||||
@app_commands.command(name="skip", description="Pomiń aktualny utwór")
|
||||
async def skip(self, interaction: discord.Interaction):
|
||||
"""Pomiń aktualny utwór"""
|
||||
if interaction.guild.voice_client.is_playing():
|
||||
guild_id = interaction.guild.id
|
||||
if self.get_loop_current(guild_id):
|
||||
self.set_loop_current(guild_id, False)
|
||||
if interaction.guild.voice_client and (interaction.guild.voice_client.is_playing() or interaction.guild.voice_client.is_paused()):
|
||||
interaction.guild.voice_client.stop()
|
||||
await self.trigger_state_change()
|
||||
await interaction.response.send_message(
|
||||
|
||||
Reference in new issue
Block a user