@codebam/cf-workers-telegram-bot 9.1.3 → 9.1.4
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/dist/telegram_bot.js
CHANGED
|
@@ -69,8 +69,8 @@ export default class TelegramBot {
|
|
|
69
69
|
return ':inline' in this.commands ? ':inline' : this.defaultCommand;
|
|
70
70
|
}
|
|
71
71
|
// Then check if it's a command starting with /
|
|
72
|
-
if (args.
|
|
73
|
-
const command = args.
|
|
72
|
+
if (args[0].startsWith('/')) {
|
|
73
|
+
const command = args[0].substring(1, args[0].lastIndexOf('@') > -1 ? args[0].lastIndexOf('@') : args[0].length);
|
|
74
74
|
return command in this.commands ? command : this.defaultCommand;
|
|
75
75
|
}
|
|
76
76
|
return this.defaultCommand;
|
|
@@ -7,7 +7,7 @@ export default class TelegramInlineQueryResultArticle extends TelegramInlineQuer
|
|
|
7
7
|
super('article');
|
|
8
8
|
this.title = data.title ?? '';
|
|
9
9
|
this.input_message_content = {
|
|
10
|
-
message_text: data.content
|
|
10
|
+
message_text: data.content,
|
|
11
11
|
parse_mode: data.parse_mode ?? '',
|
|
12
12
|
};
|
|
13
13
|
this.thumb_url = data.thumb_url ?? '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebam/cf-workers-telegram-bot",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.4",
|
|
4
4
|
"description": "serverless telegram bot on cf workers",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"module": "./dist/main.js",
|
|
@@ -31,16 +31,19 @@
|
|
|
31
31
|
"url": "https://github.com/codebam/cf-workers-telegram-bot.git"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@cloudflare/workers-types": "^4.
|
|
35
|
-
"@eslint/js": "^
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
37
|
-
"@typescript-eslint/parser": "^8.
|
|
38
|
-
"eslint": "^
|
|
39
|
-
"eslint-config-prettier": "^10.1.
|
|
40
|
-
"globals": "^
|
|
41
|
-
"prettier": "^3.
|
|
42
|
-
"typescript": "^5.
|
|
43
|
-
"typescript-eslint": "^8.
|
|
44
|
-
"vitest": "^
|
|
34
|
+
"@cloudflare/workers-types": "^4.20260227.0",
|
|
35
|
+
"@eslint/js": "^10.0.1",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
37
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
38
|
+
"eslint": "^10.0.0",
|
|
39
|
+
"eslint-config-prettier": "^10.1.8",
|
|
40
|
+
"globals": "^17.3.0",
|
|
41
|
+
"prettier": "^3.8.1",
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"typescript-eslint": "^8.56.0",
|
|
44
|
+
"vitest": "^4.0.18"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"typedoc": "0.28.17"
|
|
45
48
|
}
|
|
46
49
|
}
|