Improve diceroll looks, implement limits to avoid abuse

This commit is contained in:
2022-12-19 17:30:47 +01:00
parent 982902fc6d
commit b033763704
4 changed files with 57 additions and 5 deletions

View File

@@ -44,6 +44,9 @@ public class ClearCommand extends SlashCommandImpl
OptionMapping amountOption = event.getOption("amount");
int toDeleteAmount = amountOption == null ? 1 : amountOption.getAsInt();
// cap the amount to avoid abuse.
if(toDeleteAmount > ClearChat.getMaxAmount()) toDeleteAmount = 0;
error = ClearChat.checkDeleteAmount(toDeleteAmount);
if(error != null)
{