aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/music/stop.py
blob: e04370efc3bb95341cd7334aa8d4dff40f7a94dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.respond(content="\u200b", ephemeral=True)
        await ctx.interaction.delete_original_response()
        await ctx.voice_client.disconnect()
        logger.info("Bot disconnected from voice channel")


def setup(bot):
    bot.add_cog(Stop(bot))