From 4b9bd0278267b34fc65a9ed0d0f1b8a1a29c0c8a Mon Sep 17 00:00:00 2001 From: Samlon Date: Mon, 11 Aug 2025 15:28:20 +0200 Subject: fixing not working skip --- cogs/music/skip.py | 62 ------------------------------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 cogs/music/skip.py (limited to 'cogs/music/skip.py') diff --git a/cogs/music/skip.py b/cogs/music/skip.py deleted file mode 100644 index b0023fe..0000000 --- a/cogs/music/skip.py +++ /dev/null @@ -1,62 +0,0 @@ -from discord.ext import commands - - -class Skip(commands.Cog): - def __init__(self, bot): - self.bot = bot - - @commands.slash_command(name="pomiń", description="przeskocz do nastepnej melodyji") - async def pomin(self, ctx): - """Skip the current song and play the next one in the queue.""" - vc = ctx.voice_client - - if not vc or not vc.is_connected(): - await ctx.respond("Nie jestem połączony z kanałem głosowym.") - return - - if not vc.is_playing() and not vc.is_paused(): - await ctx.respond("Nic nie jest teraz odtwarzane.") - return - - # Get the play cog - play_cog = self.bot.get_cog('Play') - if not play_cog: - await ctx.respond("Błąd: Nie można znaleźć modułu odtwarzania.") - return - - queue = play_cog.get_queue(ctx.guild.id) - - if not queue: - await ctx.respond("Kolejka jest pusta.") - return - - # Stop the current song (this will trigger play_next in the after callback) - vc.stop() - await ctx.respond("Pominięto aktualną piosenkę.") - - @commands.slash_command(name="kolejka", description="pokaż aktualną kolejkę") - async def queue_list(self, ctx): - """Show the current queue.""" - play_cog = self.bot.get_cog('Play') - if not play_cog: - await ctx.respond("Błąd: Nie można znaleźć modułu odtwarzania.") - return - - queue = play_cog.get_queue(ctx.guild.id) - - if not queue: - await ctx.respond("Kolejka jest pusta.") - return - - queue_list = [] - for i, (title, _) in enumerate(queue[:10], 1): # Show up to 10 songs - queue_list.append(f"{i}. {title}") - - if len(queue) > 10: - queue_list.append(f"...i {len(queue) - 10} więcej") - - await ctx.respond("\n".join(["**Kolejka:**"] + queue_list)) - - -def setup(bot): - bot.add_cog(Skip(bot)) -- cgit v1.2.3