cee-studio / orca

C Multi-REST API library for Discord, Slack, Reddit, etc.

Home Page:https://cee-studio.github.io/orca/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need a function to delete n replies send by a bot

mlite opened this issue · comments

commented

Sometime bot's replies polluted the channel. It will be handy of there is an API that we can delete n bot's replies in one call.

commented

This will be useful for all bots.

https://discord.com/developers/docs/resources/channel#bulk-delete-messages

We will need to implement this, then its pretty straight-forward. Use channel::message::get_list() to fetch messages, iterate through them and for every message whose author is the bot we add it to the array of message_ids that will then be given as a parameter to channel::message::bulk_del()

commented

Yes, this might work. I will work on this one.

commented

We can delete all replies sent by a bot. We need to improve it so only people have the permissions to do the clean up.