From dd753aab2e3bfd6e6f59226f7fa552f5cfd8282e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 7 Jun 2021 14:12:49 +0200 Subject: [PATCH] Add support for /mode without arguments --- commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.js b/commands.js index 694bf17..ad559d1 100644 --- a/commands.js +++ b/commands.js @@ -179,11 +179,11 @@ export default { }, }, "mode": { - usage: "[target] [mode args...]", - description: "Change channel or user mode", + usage: "[target] [modes] [mode args...]", + description: "Query or change a channel or user mode", execute: (app, args) => { var target = args[0]; - if (target.startsWith("+") || target.startsWith("-")) { + if (!target || target.startsWith("+") || target.startsWith("-")) { var activeChannel = getActiveChannel(app); args = [activeChannel, ...args]; }