@pipedream/telegram_bot_api 0.3.7 → 0.3.8
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
CHANGED
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "telegram_bot_api-new-bot-command-received",
|
|
6
6
|
name: "New Bot Command Received (Instant)",
|
|
7
7
|
description: "Emit new event each time a Telegram Bot command is received.",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
|
@@ -34,6 +34,13 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
processEvent(event) {
|
|
36
36
|
const message = event.edited_message ?? event.message;
|
|
37
|
+
|
|
38
|
+
if (!message?.text) {
|
|
39
|
+
console.log("Skipping message that isn’t a bot command");
|
|
40
|
+
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
37
44
|
const command = message.text.split(" ")[0];
|
|
38
45
|
|
|
39
46
|
if (typeof this.commands === "string") {
|