from discord.ext import commands import logging logger = logging.getLogger(__name__) class Stop(commands.Cog): def __init__(self, bot): self.bot = bot @commands.slash_command(name="stop", description="stopuj bota") async def stop(self, ctx): await ctx.voice_client.disconnect() logger.info("Bot disconnected from voice channel") def setup(bot): bot.add_cog(Stop(bot))