I am making discord verification bot. I have this now:
@bot.command(pass_context=True)
async def verify(ctx):
MEMBER = discord.utils.get(ctx.guild.roles, name= "♰・Member")
UNVER = discord.utils.get(ctx.guild.roles, name= "♰・No Verification")
embed=discord.Embed(title=":oktagon: Verification", description="You are now Verified!", color=0xe67e22)
await ctx.send(embed=embed)
await ctx.author.add_roles(MEMBER)
await ctx.author.remove_roles(UNVER)
@bot.event
async def on_member_join(member):
UNVEREFE = discord.utils.get(ctx.guild.roles, name= "♰・No Verification")
await ctx.author.add_roles(UNVEREFE)
I want him to delete every message and specific delete that verify success message after like 5 seconds. Can i do it somehow? and I also want it to delete every other new message, including that command .verify. Can i somehow do it? Thanks.
Sorry, I do not quite understand what exactly you mean, but there are several ways to delete a message after it has been sent.
First is to use the
delete_after
argument in thesend
function like this:https://discordpy.readthedocs.io/en/master/api.html?highlight=send#discord.abc.Messageable.send
Secondly you could also delete it manually:
And if you want to delete the message that invoked the command (aka the
.verify
message), you can use:Hope this answers your question.