gramio 0.0.48 → 0.0.49
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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/bot.js +9 -1
- package/package.json +6 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Kravets
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
[](https://core.telegram.org/bots/api)
|
|
6
6
|
[](https://www.npmjs.org/package/@gramio/core)
|
|
7
7
|
[](https://jsr.io/@gramio/core)
|
|
8
8
|
[](https://jsr.io/@gramio/core)
|
package/dist/bot.js
CHANGED
|
@@ -750,7 +750,15 @@ let Bot = (() => {
|
|
|
750
750
|
*/
|
|
751
751
|
async init() {
|
|
752
752
|
await Promise.all(this.lazyloadPlugins.map(async (plugin) => this.extend(await plugin)));
|
|
753
|
-
|
|
753
|
+
const info = await this.api.getMe({
|
|
754
|
+
suppress: true,
|
|
755
|
+
});
|
|
756
|
+
if (info instanceof errors_1.TelegramError) {
|
|
757
|
+
if (info.code === 404)
|
|
758
|
+
info.message = "The bot token is incorrect. Check it in BotFather.";
|
|
759
|
+
throw info;
|
|
760
|
+
}
|
|
761
|
+
this.info = info;
|
|
754
762
|
}
|
|
755
763
|
/**
|
|
756
764
|
* Start receive updates via long-polling or webhook
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gramio",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.49",
|
|
5
5
|
"description": "Powerful, extensible and really type-safe Telegram Bot API framework",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"try-deno": "deno publish --unstable-sloppy-imports --dry-run --allow-slow-types --allow-dirty"
|
|
26
26
|
},
|
|
27
27
|
"author": "kravets",
|
|
28
|
-
"license": "
|
|
28
|
+
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@biomejs/biome": "1.8.3",
|
|
31
|
-
"@types/bun": "^1.1.
|
|
31
|
+
"@types/bun": "^1.1.8",
|
|
32
32
|
"@types/debug": "^4.1.12",
|
|
33
33
|
"pkgroll": "^2.4.2",
|
|
34
34
|
"typescript": "^5.5.4"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@gramio/callback-data": "^0.0.3",
|
|
38
|
-
"@gramio/contexts": "^0.0.
|
|
38
|
+
"@gramio/contexts": "^0.0.23",
|
|
39
39
|
"@gramio/files": "^0.0.12",
|
|
40
40
|
"@gramio/format": "^0.1.3",
|
|
41
41
|
"@gramio/keyboards": "^0.3.3",
|
|
42
|
-
"@gramio/types": "^7.
|
|
43
|
-
"debug": "^4.3.
|
|
42
|
+
"@gramio/types": "^7.10.0",
|
|
43
|
+
"debug": "^4.3.7",
|
|
44
44
|
"inspectable": "^3.0.2",
|
|
45
45
|
"middleware-io": "^2.8.1"
|
|
46
46
|
},
|