diff options
Diffstat (limited to '')
| -rw-r--r-- | cogs/music/queue.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/cogs/music/queue.py b/cogs/music/queue.py deleted file mode 100644 index d932838..0000000 --- a/cogs/music/queue.py +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | from discord.ext import commands | ||
| 2 | |||
| 3 | |||
| 4 | class Queue(commands.Cog): | ||
| 5 | def __init__(self, bot): | ||
| 6 | self.bot = bot | ||
| 7 | self.queues = {} | ||
| 8 | |||
| 9 | def get_queue(self, guild_id): | ||
| 10 | return self.queues.setdefault(guild_id, []) | ||
| 11 | |||
| 12 | @commands.slash_command(name="koleyjka", description="pokazuje koleyjke") | ||
| 13 | async def queue(self, ctx): | ||
| 14 | guild_id = ctx.guild.id | ||
| 15 | queue = self.get_queue(guild_id) | ||
| 16 | if queue: | ||
| 17 | queue_str = "\n".join(f"{i + 1}. {title}" for i, (_, title, _) in enumerate(queue)) | ||
| 18 | await ctx.respond(f"koleyjka:\n{queue_str}") | ||
| 19 | else: | ||
| 20 | await ctx.respond("koleyjka jest pustawa") | ||
| 21 | |||
| 22 | |||
| 23 | def setup(bot): | ||
| 24 | bot.add_cog(Queue(bot)) | ||
