telekit-cmd
Advanced tools
Comparing version 0.1.1 to 0.1.2
21
index.js
@@ -73,13 +73,18 @@ /** | ||
if (command) { | ||
if (command.entities[0].type == 'bot_command') { | ||
context.isCommand = true; | ||
context.command = command; | ||
command.name = command.entities[0].name; | ||
command.mention = command.entities[0].mention; | ||
telekit.emit('command', context); | ||
telekit.emit(`/${context.command.entities[0].name}`, context); | ||
if (telekit.command) telekit.command(context); | ||
telekit.middleware.transmit('command', context); | ||
context.isCommand = true; | ||
context.command = command; | ||
return; | ||
telekit.emit('command', context); | ||
telekit.emit(`/${context.command.entities[0].name}`, context); | ||
if (telekit.command) { | ||
telekit.command(context); | ||
} | ||
telekit.middleware.transmit('command', context); | ||
return; | ||
} | ||
@@ -86,0 +91,0 @@ |
{ | ||
"name": "telekit-cmd", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "This extend module for `telekit` that adds support of commands", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4562
81