edited acc/dec embed

main
Anorak_1 2023-07-16 11:10:19 +02:00
parent ee513cf554
commit b4483e938d
1 changed files with 8 additions and 4 deletions

12
bot.py
View File

@ -146,8 +146,10 @@ class ApplicationModal(discord.ui.Modal):
await discord.utils.get(interaction.message.guild.members, id=int(user_id)).add_roles(role)
emb = interaction.message.embeds[0]
emb.colour = discord.Colour.green()
emb.add_field(name=f'REASON: ', value=reason, inline=False)
await interaction.followup.edit_message(message_id = interaction.message.id, embeds=[emb])
embed = discord.Embed(title='Accepted')
embed.add_field(name=f'Reason:', value=reason, inline=False)
embed.colour = discord.Colour.green()
await interaction.followup.edit_message(message_id = interaction.message.id, embeds=[emb, embed])
if self.action == "dec":
user = await bot.get_user(user_id).create_dm()
await user.send(f"You have been declined access to the CreatTopia Minecraft server.")
@ -155,7 +157,9 @@ class ApplicationModal(discord.ui.Modal):
await interaction.response.send_message(content="Application declined", ephemeral=True)
emb = interaction.message.embeds[0]
emb.colour = discord.Colour.red()
emb.add_field(name=f'REASON: ', value=reason, inline=False)
await interaction.followup.edit_message(message_id = interaction.message.id, embeds=[emb])
embed = discord.Embed(title='Declined')
embed.add_field(name=f'Reason:', value=reason, inline=False)
embed.colour = discord.Colour.red()
await interaction.followup.edit_message(message_id = interaction.message.id, embeds=[emb, embed])
bot.run(TOKEN)