telegram-botbuilder 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/bot-service.ts +3 -3
package/package.json
CHANGED
package/src/bot-service.ts
CHANGED
|
@@ -84,7 +84,7 @@ export class BotBuilder {
|
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
this._bot.onText(/\/start/, async (msg) => {
|
|
87
|
-
if (await this._runmw(msg.chat.id, msg)) return;
|
|
87
|
+
//if (await this._runmw(msg.chat.id, msg)) return;
|
|
88
88
|
|
|
89
89
|
if (!this._userdialogs[msg.chat.id]) this._userdialogs[msg.chat.id] = {dialog: this._schema.start, lastid: -1, waiter: { statewait: false, descriptor: '' }}
|
|
90
90
|
this._bot.deleteMessage(msg.chat.id, msg.message_id).catch(() => undefined);
|
|
@@ -92,8 +92,8 @@ export class BotBuilder {
|
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
for (let cmd of this._schema.commands) {
|
|
95
|
-
this._bot.onText(new RegExp(
|
|
96
|
-
if (await this._runmw(msg.chat.id, msg)) return;
|
|
95
|
+
this._bot.onText(new RegExp(`\\/${cmd.text}(?:\\s+(.*))?$`), async (msg, match) => {
|
|
96
|
+
//if (await this._runmw(msg.chat.id, msg)) return;
|
|
97
97
|
|
|
98
98
|
let chat = msg.chat.id;
|
|
99
99
|
if (Array.isArray(cmd?.action)) {
|