mikeyaworski / Utility-Discord-Bot

A Discord utility bot
7 stars 33 forks source link

Add a !purge command #4

Open mikeyaworski opened 3 years ago

mikeyaworski commented 3 years ago
mikeyaworski commented 3 years ago

For confirmation, we can do something like what Carl does: image image

mikeyaworski commented 3 years ago

Added ConfirmationCommand here: 132833470e3e99498949c9c350630cdda99b70d9

mikeyaworski commented 3 years ago

Note the similarity between !purge and !delete. The only difference is that !purge allows you to specify a user/channel to purge. We can try to merge them into the same command, but based on the nature of the optional arguments, it might be easiest to keep them as two separate commands. To merge them, we would have to manually parse the args, rather than using the value that Commando brings to us.

!delete is for message ranges within the channel. !purge is for purging a channel or user (optionally within some message range). But purge a user/channel; delete messages.

!purge <user | channel> [channel] [startMessage] [endMessage]

So then

!purge @someUser
!purge @someUser #in-some-channel
!purge @someUser #in-some-channel from-here to-here
!purge #some-channel