chz-telegram-bot 0.0.44 → 0.0.46
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incomingMessage.d.ts","sourceRoot":"","sources":["../../entities/incomingMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAe,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,qBAAa,eAAe;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,SAA2B;IAElC,OAAO,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"incomingMessage.d.ts","sourceRoot":"","sources":["../../entities/incomingMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAe,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,qBAAa,eAAe;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,SAA2B;IAElC,OAAO,CAAC,iBAAiB;gBAkBb,UAAU,EAAE,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC;CAWrE"}
|
|
@@ -5,6 +5,8 @@ const crypto_1 = require("crypto");
|
|
|
5
5
|
const messageTypes_1 = require("../types/messageTypes");
|
|
6
6
|
class IncomingMessage {
|
|
7
7
|
detectMessageType(message) {
|
|
8
|
+
if ('text' in message)
|
|
9
|
+
return messageTypes_1.MessageType.Text;
|
|
8
10
|
if ('photo' in message)
|
|
9
11
|
return messageTypes_1.MessageType.Photo;
|
|
10
12
|
if ('sticker' in message)
|
|
@@ -14,6 +14,7 @@ export class IncomingMessage {
|
|
|
14
14
|
private detectMessageType(
|
|
15
15
|
message: Update.New & (Update.NonChannel & Message)
|
|
16
16
|
) {
|
|
17
|
+
if ('text' in message) return MessageType.Text;
|
|
17
18
|
if ('photo' in message) return MessageType.Photo;
|
|
18
19
|
if ('sticker' in message) return MessageType.Sticker;
|
|
19
20
|
if ('animation' in message) return MessageType.Animation;
|