If you have better options, please let me know.
@bot.slash_commands()
async def sell(ctx):
ctx.send("Bla bla bla", delete_after=60)
@bot.event
async def on_message_delete():
...
Well...I am hoping that you are talking about a discord bot or a client here... For deleting a message after a while you can use the following code: I am sure that since you have mentioned the usage of a slash command, you would have used the "interaction" parameter in your function but just in case I shall give the code for ctx also... if ctx:
await ctx.send("your message here", delete_after=60)
or if interaction:
await interaction.response.send_message("your message here", delete_after=60)
in the meanwhile you may have a listener going on as such:
@bot.event
async def on_message_delete(message):
message_content=message.content
you can do any required functions with the message_content... Hope this helps you!