Bug fixes and ~~performance~~ typing improvements
diff --git a/ClicksMigratingProblems/randomPunishments.js b/ClicksMigratingProblems/randomPunishments.js
index 4ea01d2..af9c908 100644
--- a/ClicksMigratingProblems/randomPunishments.js
+++ b/ClicksMigratingProblems/randomPunishments.js
@@ -7,50 +7,21 @@
for (let i = 0; i < 100; i++) {
// Select a type
- let type = [
- "join",
- "unban",
- "leave",
- "ban",
- "softban",
- "kick",
- "mute",
- "purge",
- "warn",
- "nickname"
- ][Math.floor(Math.random() * 9)];
+ let type = ["join", "unban", "leave", "ban", "softban", "kick", "mute", "purge", "warn", "nickname"][
+ Math.floor(Math.random() * 9)
+ ];
// Select a random date in the last year
- let date = new Date(
- new Date().getTime() - Math.floor(Math.random() * 31536000000)
- );
+ let date = new Date(new Date().getTime() - Math.floor(Math.random() * 31536000000));
// Add to database
await collection.insertOne({
type: type,
occurredAt: date,
user: "438733159748599813",
guild: "864185037078790195",
- moderator: [
- "unban",
- "ban",
- "softban",
- "kick",
- "mute",
- "purge",
- "warn"
- ].includes(type)
+ moderator: ["unban", "ban", "softban", "kick", "mute", "purge", "warn"].includes(type)
? "438733159748599813"
: null,
- reason: [
- "unban",
- "ban",
- "softban",
- "kick",
- "mute",
- "purge",
- "warn"
- ].includes(type)
- ? "Test"
- : null,
+ reason: ["unban", "ban", "softban", "kick", "mute", "purge", "warn"].includes(type) ? "Test" : null,
before: type === "nickname" ? "TestBefore" : null,
after: type === "nickname" ? "TestAfter" : null,
amount: type === "purge" ? Math.floor(Math.random() * 100) : null