Untitled
unknown
python
8 months ago
761 B
1
Indexable
class BotaoCall(discord.ui.Button): def __init__(self, label, style): super().__init__(label=label, style=style) async def callback(self, interaction: discord.Interaction): guild = interaction.guild.get_channel(id_canal_chamada_suporte) channel = await guild.create_voice_channel(interaction.user.name) channel = await channel.edit(user_limit=2) canalTemporario.append(channel.id) await interaction.response.send_message(f'Entre na sua chamada {channel.mention}. Canal será excluído após 20s de inatividade.', ephemeral=True) while True: await asyncio.sleep(20) if not channel.members: await channel.delete() return
Editor is loading...
Leave a Comment