PKlempe / SAM

SAM is a multi-functional Discord Bot specifically designed for the Server of the Faculty of Computer Science at the University of Vienna.
GNU General Public License v3.0
27 stars 6 forks source link

Fix purge messages in modlog #195

Closed PKlempe closed 3 years ago

PKlempe commented 3 years ago

Fix the typos and the amount of purged messages in the purge info message which is being posted in the configured modlog.

Keep in mind that if you don't specify a channel for the purge command, the messages will be removed from the current channel in which the command has been invoked. This means that SAM needs to remove one message more (the invokation of the command) but still should only log the specified amount of messages provided by the user.

Examples: !purge #test-channel 10: Delete the last 10 messages in "test-channel". The amount of messages shown in the modlog should be 10. !purge 10: Delete the last 10 messages in the current channel + the invokation of this command. The amount of messages shown in the modlog should also be 10 (the invokation doesn't count).