Untitled

mail@pastecode.io avatar
unknown
python
20 days ago
1.3 kB
1
Indexable
Never
class Remover_Adv(discord.ui.Modal): # Classe de remover advertencia
    def __init__(self):
        super().__init__(title='Sugestão')

    player = discord.ui.TextInput(label='ID', placeholder='ID do player', max_length=10)
    motivo = discord.ui.TextInput(label='Motivo', style=discord.TextStyle.long, max_length=1000)
    suporte = discord.ui.TextInput(label='Suporte', placeholder='Nome do Staff', max_length=20)
    async def on_submit(self, interaction:discord.Interaction):
        logschannel = interaction.guild.get_channel(id_canal_logs_adv_founder)
        logschannelstaff= interaction.guild.get_channel(id_canal_logs_adv)
        embedfounder = discord.Embed(
            color= 16722474,
            title= 'Advertência removida',
            description= f'**ID:** {self.player}\n**Motivo:** {self.motivo}\n\n**Advertência removida por:** {self.suporte}'
        )
        embedstaff = discord.Embed(
            color= 26367,
            title= 'Advertência aplicada',
            description= f'**ID**: {self.player}\n**Regra**: {self.regra}\n**Tempo**: {self.tempo}\n**Motivo**: {self.motivo}'
        )
        await interaction.response.send_message(embed=embedstaff, ephemeral=True)
        await logschannel.send(embed=embedfounder)
        await logschannelstaff.send(embed=embedstaff)
Leave a Comment