used the _getInputMessage()
This commit is contained in:
@@ -83,17 +83,16 @@ class Command{
|
|||||||
*/
|
*/
|
||||||
getInput(message){
|
getInput(message){
|
||||||
|
|
||||||
let splitMsg = message.split(' ');
|
let splitMsg = this._getInputMessage(message);
|
||||||
let splitCommand = this.command.split(' ');
|
let splitCommand = this.command.split(' ');
|
||||||
let input = {};
|
let input = {};
|
||||||
|
let debug = '';
|
||||||
for(let i = 0; i < splitMsg.length; i++){
|
for(let i = 0; i < splitMsg.length; i++){
|
||||||
if(splitCommand[i].startsWith('<')){
|
if(splitCommand[i].startsWith('<')){
|
||||||
let key = splitCommand[i].slice(1, splitCommand[i].length-1);
|
let key = splitCommand[i].slice(1, splitCommand[i].length-1);
|
||||||
input[key] = splitMsg[i];
|
input[key] = splitMsg[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user