handle slashcommands with no args
This commit is contained in:
parent
62a1100fca
commit
5bde32f7fe
1 changed files with 8 additions and 2 deletions
|
@ -335,8 +335,14 @@ module.exports = {
|
|||
input = input.replace(/\s+$/, "");
|
||||
if (input[0] === "/" && input[1] !== "/") {
|
||||
var bits = input.match(/^(\S+?)( +(.*))?$/);
|
||||
var cmd = bits[1].substring(1).toLowerCase();
|
||||
var args = bits[3];
|
||||
var cmd, args;
|
||||
if (bits) {
|
||||
cmd = bits[1].substring(1).toLowerCase();
|
||||
args = bits[3];
|
||||
}
|
||||
else {
|
||||
cmd = input;
|
||||
}
|
||||
if (cmd === "me") return null;
|
||||
if (aliases[cmd]) {
|
||||
cmd = aliases[cmd];
|
||||
|
|
Loading…
Reference in a new issue