From 51d775dc4cf6877939daec209dff27e161cdfa71 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 27 May 2021 08:13:22 -0400 Subject: [PATCH] Add /j alias for /join --- commands.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/commands.js b/commands.js index bd61c4d..7b5f5d1 100644 --- a/commands.js +++ b/commands.js @@ -9,6 +9,18 @@ function getActiveClient(app) { return app.clients.get(buf.network); } +const join = { + usage: "", + description: "Join a channel", + execute: (app, args) => { + var channel = args[0]; + if (!channel) { + throw new Error("Missing channel name"); + } + getActiveClient(app).send({ command: "JOIN", params: [channel] }); + }, +}; + export default { "buffer": { usage: "", @@ -46,17 +58,8 @@ export default { app.openHelp(); }, }, - "join": { - usage: "", - description: "Join a channel", - execute: (app, args) => { - var channel = args[0]; - if (!channel) { - throw new Error("Missing channel name"); - } - getActiveClient(app).send({ command: "JOIN", params: [channel] }); - }, - }, + "j": join, + "join": join, "kick": { usage: "", description: "Remove a user from the channel",