Skip to content

Commit d93317e

Browse files
committed
Pass the params as well
1 parent b6c1f8f commit d93317e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/components/Chat.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,12 @@ function () {
248248
params = _msg$message$slice$sp2.slice(1);
249249

250250
if (commandName in this.aliases) {
251-
commandName = this.aliases[commandName];
251+
var _this$aliases$command = this.aliases[commandName].split(" ");
252+
253+
var _this$aliases$command2 = _toArray(_this$aliases$command);
254+
255+
commandName = _this$aliases$command2[0];
256+
params = _this$aliases$command2.slice(1);
252257
}
253258

254259
switch (true) {

src/components/Chat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class Chat {
206206
let [commandName, ...params] = msg.message.slice(1).split(" ");
207207

208208
if (commandName in this.aliases) {
209-
commandName = this.aliases[commandName];
209+
[commandName, ...params] = this.aliases[commandName].split(" ");
210210
}
211211

212212
switch (true) {

0 commit comments

Comments
 (0)