from discord.ext import commands import logging logger = logging.getLogger(__name__) class Join(commands.Cog): def __init__(self, bot): self.bot = bot @commands.slash_command(name="join", description="dołącza do kanalu") async def join(self, ctx): channel = ctx.author.voice.channel await channel.connect() await ctx.respond(content="\u200b", ephemeral=True) await ctx.interaction.delete_original_response() logger.info("Bot connected to voice channel") def setup(bot): bot.add_cog(Join(bot))