Comparing version 0.0.25 to 0.0.26
@@ -400,3 +400,3 @@ "use strict"; | ||
hears(trigger, handler) { | ||
return this.on("message", (context, next) => { | ||
return this.on(["message", "business_message"], (context, next) => { | ||
if ((typeof trigger === "string" && context.text === trigger) || | ||
@@ -421,3 +421,3 @@ // @ts-expect-error | ||
throw new Error("Do not use / in command name"); | ||
return this.on("message", (context, next) => { | ||
return this.on(["message", "business_message"], (context, next) => { | ||
// TODO: change to find | ||
@@ -424,0 +424,0 @@ if (context.entities?.some((entity) => { |
@@ -40,3 +40,2 @@ "use strict"; | ||
update: data, | ||
//@ts-expect-error | ||
payload: data[updateType], | ||
@@ -47,10 +46,11 @@ type: updateType, | ||
if ("isEvent" in context && context.isEvent() && context.eventType) { | ||
// @ts-expect-error contextsMappings is any | ||
context = new contexts_1.contextsMappings[context.eventType]({ | ||
bot: this.bot, | ||
update: data, | ||
//@ts-expect-error | ||
payload: data.message ?? | ||
data.edited_message ?? | ||
data.channel_post ?? | ||
data.edited_channel_post, | ||
data.edited_channel_post ?? | ||
data.business_message, | ||
type: context.eventType, | ||
@@ -57,0 +57,0 @@ updateId: data.update_id, |
{ | ||
"name": "gramio", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"description": "Powerful Telegram Bot API framework", | ||
@@ -27,5 +27,4 @@ "main": "./dist/index.js", | ||
"devDependencies": { | ||
"@biomejs/biome": "1.6.2", | ||
"@gramio/types": "^7.1.7", | ||
"@types/node": "^20.11.30", | ||
"@biomejs/biome": "1.6.4", | ||
"@types/node": "^20.12.4", | ||
"typescript": "^5.4.3" | ||
@@ -35,9 +34,10 @@ }, | ||
"@gramio/callback-data": "^0.0.2", | ||
"@gramio/contexts": "^0.0.7", | ||
"@gramio/files": "^0.0.3", | ||
"@gramio/contexts": "^0.0.8", | ||
"@gramio/files": "^0.0.4", | ||
"@gramio/format": "^0.0.8", | ||
"@gramio/keyboards": "^0.2.2", | ||
"@gramio/keyboards": "^0.2.3", | ||
"@gramio/types": "^7.2.1", | ||
"inspectable": "^3.0.0", | ||
"middleware-io": "^2.8.1", | ||
"undici": "^6.10.1" | ||
"undici": "^6.11.1" | ||
}, | ||
@@ -44,0 +44,0 @@ "files": [ |
# GramIO | ||
Work in progress | ||
Work in progress. | ||
Currently support Bot API 7.1 | ||
Currently support Bot API 7.2 | ||
See [Documentation](https://gramio.netlify.app/) |
48843
3
9
+ Added@gramio/types@^7.2.1
+ Added@gramio/contexts@0.0.8(transitive)
+ Added@gramio/files@0.0.4(transitive)
- Removed@gramio/contexts@0.0.7(transitive)
- Removed@gramio/files@0.0.3(transitive)
Updated@gramio/contexts@^0.0.8
Updated@gramio/files@^0.0.4
Updated@gramio/keyboards@^0.2.3
Updatedundici@^6.11.1