[feat]: Commands to group

This commit is contained in:
Sweetbread
2023-05-18 22:54:43 +03:00
parent f858ae49bf
commit e963c5ca86
2 changed files with 12 additions and 9 deletions
+4 -3
View File
@@ -6,7 +6,6 @@ import asyncio
from loguru import logger
from json import dumps
from discord import app_commands
from discord.ext import commands
from dataclasses import dataclass
from bot import db
@@ -31,8 +30,10 @@ class Channel:
# skip_policy: Enum "everyone"
class Music(commands.Cog, name="Музыка"):
@app_commands.guild_only()
class Music(app_commands.Group, name="music"):
def __init__(self, bot):
super().__init__()
self.bot = bot
self.queue: dict[int, Channel] = {}
@@ -167,4 +168,4 @@ class Music(commands.Cog, name="Музыка"):
async def setup(bot):
await bot.add_cog(Music(bot))
bot.tree.add_command(Music(bot))