1
votes

I want my bot to delete the message sent by the user as the command for example if the user commands -say hello i want the bot to delete the message by the user and send a message saying the words user sent

I have written the basic thing but i want the way to delete the message user sent

client.command()
async def say(ctx, *, words):
    await ctx.send(words)

this is the code i have written till now

1

1 Answers

0
votes

Simply use

await ctx.message.delete()

after your command code. I hope I was able to help you!