1"create a variable called id"
2var id
3"then inside your client message statement change id -> id = message.id"
4client.on('message', message => {
5 id = message.id
6});
7"inside your command type message.fetch(id).then(msg => msg.delete());"
8 if (message.content === !test)
9 message.fetch(id).then(msg => msg.delete());
10}});
1import discord.ext
2
3bot = commands.Bot(";")
4
5@bot.event
6async def on_message(message):
7 if message.content.upper().startswith(";SAY"):
8 args = message.content.split(" ")
9 await bot.send_message(message.channel, "%s" % (" ".join(args[1:])))
10 await bot.delete_message(message)
11