#Won't delete the message
1 messages ยท Page 1 of 1 (latest)
Can you show me more?
@discord.ui.button(label="Verify", style=discord.ButtonStyle.primary, emoji="๐") # Create a button with the label "๐ Click me!" with color Blurple
async def button_callback(self, button, interaction):
# Figure out who clicked the button.
user = interaction.user
# Get the role this button is for (stored in the custom ID).
role2 = interaction.guild.get_role(tagrole)
button.disabled = True
button.label = "Verified"
await user.add_roles(role2)
embedVar = discord.Embed(title="Tag", description=f'{interaction.message.author.name} test 2', color=0x00ff00)
message = await interaction.response.edit_message(embed=embedVar, view=self)
#time.sleep(6000)
await message.delete()
@bot.command() # Create a slash command
async def button(ctx):
embedVar = discord.Embed(title="Tag", description=f'{ctx.message.author.name} test', color=0x00ff00)
await ctx.send(embed=embedVar,view=View())
What IDE are you using?
visual studio code
hmm
May I come in and take a look myself?
where?
go to exstensions
wait dms
oh
nvm
i use await interaction.channel.purge(limit=2)
yea
wait your trying to purge 2 things?
the command and the message from the bot
oh okay