Command Handler working
This commit is contained in:
@@ -7,7 +7,7 @@ exports.endpoint = function endpoint (match, handler) {
|
||||
exports.apply = function apply (command, context) {
|
||||
let keys = Object.keys(commands);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let match = command.match(keys[i]);
|
||||
let match = command.match(new RegExp(keys[i]));
|
||||
if (match) {
|
||||
commands[keys[i]](match, context);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user