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

@@ -54,7 +54,8 @@ public class ClearChat
// int to keep track of how many messages we actually deleted.
int deleted = 0;
int limit = 95; //discord limits this method to range 2-100. we set it to 95 to be safe.
int limit = 95; //discord limits this method to only 2<x<100 deletions per run.
// we set this slightly lower to be safe, and iterate as needed.
// increase the count by 1, because we technically aren't clearing the first ID ever
// which is actually the slash command's ID and not a message.
@@ -193,4 +194,7 @@ public class ClearChat
}
}
// cap the amount to avoid abuse.
public static int getMaxAmount() { return 1000; }
}