From 29b1dcecb37d34ce6f7f382d955b6ec651d8de1d Mon Sep 17 00:00:00 2001 From: 20R-Grumpus Date: Tue, 8 Jul 2025 19:29:16 -0600 Subject: [PATCH] Update switch.js !switch clear to wipe the matchend queue table --- switch.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/switch.js b/switch.js index 5d19f38..933cd55 100644 --- a/switch.js +++ b/switch.js @@ -243,8 +243,13 @@ export default class Switch extends DiscordBasePlugin { this.warn(steamID, 'Test 3') }, 2000) break; + case "clear": + if (!isAdmin) return; + await this.models.Endmatch.destroy({ where: {} }); + this.warn(steamID, 'All queued match end switches have been cleared.'); + break; case "help": - let msg = `${this.options.commandPrefix}\n\n > now {username|steamID}\n > double {username|steamID}\n > matchend {username|steamID}\n`; + let msg = `${this.options.commandPrefix}\n\n > now {username|steamID}\n > double {username|steamID}\n > matchend {username|steamID}\n > clear\n`; this.warn(steamID, msg); msg = `${this.options.commandPrefix}\n\n > squad {squad_number} {teamID|teamString}\n\n > doublesquad {squad_number} {teamID|teamString}\n > matchendsquad {squad_number} {teamID|teamString}`; this.warn(steamID, msg);