From 1ebec2e31dc6ea51cb6330c67fb3708193f11e11 Mon Sep 17 00:00:00 2001 From: theburger Date: Sat, 6 Nov 2021 20:10:36 +0800 Subject: [PATCH 1/2] Update Commands.ts handle when bridgeall command is missing paramter returns error. --- src/Commands.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Commands.ts b/src/Commands.ts index 98570a7..dd7fb71 100644 --- a/src/Commands.ts +++ b/src/Commands.ts @@ -201,6 +201,9 @@ Additionally you will be invited to guild channels as messages are sent in them. await sendMessage("Puppet not found!"); return; } + if (param == null || param == undefined) { + await sendMessage("Command is missing parameters. Usage: bridgeall <1/0>"); + } const bridgeAll = param === "1" || param.toLowerCase() === "true"; p.data.bridgeAll = bridgeAll; await this.app.puppet.setPuppetData(puppetId, p.data); From 51d89fb448498d70cb29d63e0cf47a1a810329aa Mon Sep 17 00:00:00 2001 From: theburger Date: Sat, 6 Nov 2021 20:14:05 +0800 Subject: [PATCH 2/2] Update Commands.ts fix format --- src/Commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands.ts b/src/Commands.ts index dd7fb71..463ea08 100644 --- a/src/Commands.ts +++ b/src/Commands.ts @@ -202,7 +202,7 @@ Additionally you will be invited to guild channels as messages are sent in them. return; } if (param == null || param == undefined) { - await sendMessage("Command is missing parameters. Usage: bridgeall <1/0>"); + await sendMessage("Usage: `bridgeall <1/0>`"); } const bridgeAll = param === "1" || param.toLowerCase() === "true"; p.data.bridgeAll = bridgeAll;