Search code examples
pythondiscord.pyembed

I want to delete the trigger of the embed automatically how do I do it?


ex . trigger - hi , the bot responds with hello but I want the bot to automatically delete the trigger hi .

async def cd(ctx, message=None): 
 embed=discord.Embed(description= " \n ", color=3092790)
 embed.set_image(url= "cdn.discordapp.com/attachments/846254397210230806/…)
 ctx.message.delete 
 await ctx.send(embed=embed)

Solution

  • Not sure you're looking for commands or OG message, if OG message, you should using ctx.message.delete

    Here's the doc for you.