skiqqy / C45DiscordBot

Proprietary™ (Thats a joke btw) C45 discord bot.
MIT License
2 stars 1 forks source link

Command to delete last X messages by the bot #21

Closed DavidBakerEffendi closed 4 years ago

DavidBakerEffendi commented 4 years ago

Since the bot can post stupid shit that I don't want to delete, have a command that it can delete it's own X previous messages or give a pattern to delete its past messages. On a quick Google that I found out that it's possible with the JS version of the Discord API: https://www.youtube.com/watch?v=zZZHKfZFSX0

Something like:

>del 3 // Delete last three messages
>del 5 "Marks out" // Delete last five messages which contain "Marks out"
AndreiDreyer commented 4 years ago

https://discordpy.readthedocs.io/en/latest/api.html#discord.Client.delete_message

There is the discordpy API for deleting messages.

Just ctrl+f for delete_message to find it

lakshyashastri commented 4 years ago

Still need help on this one?

DavidBakerEffendi commented 4 years ago

@Skippy404 is in charge here but this was a meme bot for a class Discord channel - since that class is over I've stopped working on this bot but @LakshyaShastri you can go ahead as I believe that this issue is still relevant and needs to be handled.