feat: create command to purge a given channel#1484
Conversation
There was a problem hiding this comment.
imo needs some sort of confirmation dialog including the amount of messages that will get deleted.
otherwise all it takes is someone making a mistake and the entire channel history is gone.
a better and safer ux might be something like "purge all messages from the last x hours/minutes" or alternatively a safety check that the message to purge from isnt older than two days.
the real command we need, i think, is purging messages from a single user in all channels (like what /ban does). but difficult to do discord api wise.
|
#912 not around channels but perhaps relevant for the PR or discussion, seems like there's a graveyard of PRs and issues around this
agreed around UX feels better |
* confirmation * in progress * completion * audit log
|
Usage now:
|
|











Pull-request
Changes
Closes Issue: #912
Description
This PR introduces a new slash command for moderators called
/purge.The command takes 2 required params:
channel: so the bot knows which channel to purgemessage-id: The message to start the purge fromA third optional
amountto limit how many messages are deleted. When absent all messages after the givenmessage-idare deleted.Why?
There have been cases were we've needed to purge a channel but haven't had the tools to automatically do this. Instead, mods and admins manually delete messages which is painful.
Example of when this would have been useful: "the
@everyoneping".See comments for more context.