Discord
- 2 ответа
- 0 вопросов
2
Вклад в тег
class ExampleBtt(disnake.ui.View):
@disnake.ui.button(label="Создать канал", style=disnake.ButtonStyle.primary)
async def create_room(self, button: disnake.ui.Button, inter: disnake.MessageInteraction):
voice_channel = await inter.guild.create_voice_channel(
name=inter.author.display_name,
overwrites = {inter.author: disnake.PermissionOverwrite(manage_channels=True, manage_permissions=True)}
)
await inter.send(f"Создан канал: {voice_channel .mention}", ephemeral=True)
on_command_error