mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-12 23:43:42 +01:00
Add /j alias for /join
This commit is contained in:
parent
70c0dd1d78
commit
51d775dc4c
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…
x
Reference in New Issue
Block a user