Fix logging in
This commit is contained in:
+3
-3
@@ -18,8 +18,8 @@ const makePasswordHash = require("telegram-mtproto").plugins.makePasswordHash
|
|||||||
const commands = {}
|
const commands = {}
|
||||||
|
|
||||||
function run(sender, command, args, reply, app) {
|
function run(sender, command, args, reply, app) {
|
||||||
command = this.commands[command]
|
const commandFunc = this.commands[command]
|
||||||
if (!command) {
|
if (!commandFunc) {
|
||||||
if (sender.commandStatus) {
|
if (sender.commandStatus) {
|
||||||
if (command === "cancel") {
|
if (command === "cancel") {
|
||||||
reply(`${sender.commandStatus.action} cancelled.`)
|
reply(`${sender.commandStatus.action} cancelled.`)
|
||||||
@@ -32,7 +32,7 @@ function run(sender, command, args, reply, app) {
|
|||||||
reply("Unknown command. Try \"$cmdprefix help\" for help.")
|
reply("Unknown command. Try \"$cmdprefix help\" for help.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return command(sender, args, reply, app)
|
return commandFunc(sender, args, reply, app)
|
||||||
}
|
}
|
||||||
|
|
||||||
commands.cancel = () => "Nothing to cancel."
|
commands.cancel = () => "Nothing to cancel."
|
||||||
|
|||||||
Reference in New Issue
Block a user