mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-13 07:48:37 +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);
|
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 {
|
export default {
|
||||||
"buffer": {
|
"buffer": {
|
||||||
usage: "<name>",
|
usage: "<name>",
|
||||||
@ -46,17 +58,8 @@ export default {
|
|||||||
app.openHelp();
|
app.openHelp();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"join": {
|
"j": join,
|
||||||
usage: "<name>",
|
"join": join,
|
||||||
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] });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"kick": {
|
"kick": {
|
||||||
usage: "<user>",
|
usage: "<user>",
|
||||||
description: "Remove a user from the channel",
|
description: "Remove a user from the channel",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user