mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-28 18:45:51 -05:00
Add /j alias for /join
This commit is contained in:
parent
70c0dd1d78
commit
51d775dc4c
1 changed files with 14 additions and 11 deletions
25
commands.js
25
commands.js
|
@ -9,6 +9,18 @@ function getActiveClient(app) {
|
|||
return app.clients.get(buf.network);
|
||||
}
|
||||
|
||||
const join = {
|
||||
usage: "<name>",
|
||||
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: "<name>",
|
||||
|
@ -46,17 +58,8 @@ export default {
|
|||
app.openHelp();
|
||||
},
|
||||
},
|
||||
"join": {
|
||||
usage: "<name>",
|
||||
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: "<user>",
|
||||
description: "Remove a user from the channel",
|
||||
|
|
Loading…
Reference in a new issue