From 6438e382b6fbae00f6c140ff688f610217884088 Mon Sep 17 00:00:00 2001 From: sergelouie6 <49586590+sergelouie6@users.noreply.github.com> Date: Sat, 6 Jan 2024 06:47:32 +0800 Subject: [PATCH] fix: move logging of connection and match start --- switch.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/switch.js b/switch.js index 5c35d46..25e66a8 100644 --- a/switch.js +++ b/switch.js @@ -158,8 +158,6 @@ export default class Switch extends DiscordBasePlugin { const teamID = info.player?.teamID; const message = info.message.toLowerCase(); - this.verbose(1, `${playerName}:\n > Connection: ${this.getSecondsFromJoin(steamID)}\n > Match Start: ${this.getSecondsFromMatchStart()}`) - if (this.options.doubleSwitchCommands.find(c => c.toLowerCase() == message)) this.doubleSwitchPlayer(steamID) @@ -168,6 +166,7 @@ export default class Switch extends DiscordBasePlugin { if ((typeof this.options.commandPrefix === 'string' && !message.startsWith(this.options.commandPrefix)) || (typeof this.options.commandPrefix === 'object' && this.options.commandPrefix.length >= 1 && !this.options.commandPrefix.find(c => message.startsWith(c.toLowerCase())))) return; this.verbose(1, 'Received command', message, commandPrefixInUse) + this.verbose(1, `${playerName}:\n > Connection: ${this.getSecondsFromJoin(steamID)}\n > Match Start: ${this.getSecondsFromMatchStart()}`) const commandSplit = message.substring(commandPrefixInUse.length).trim().split(' '); const subCommand = commandSplit[ 0 ]; @@ -517,4 +516,4 @@ export default class Switch extends DiscordBasePlugin { return ret[ 0 ]; } -} \ No newline at end of file +}