delete the bots message after time discor.py code example
Example 1: how to make a discord bot delete messages python
import discord
@client.event
async def on_message(message):
response = await message.channel.send("Hello")
# Deletes the message the user sent
await message.delete()
# Deletes the responding message
await response.delete()
Example 2: delete message discord.py
@client.event
async def on_message(message):
await message.delete()