Skip to content

Commit

Permalink
feat: support Bot API 7.1 (#532)
Browse files Browse the repository at this point in the history
* feat: support Bot API 7.1

* build: update types
  • Loading branch information
KnorpelSenf authored Feb 16, 2024
1 parent 46f46ee commit 85b3c41
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 24 deletions.
38 changes: 19 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"deno.enable": true,
"deno.config": "./deno.jsonc",
"deno.lint": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[json]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[jsonc]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"deno.enable": true,
"deno.config": "./deno.jsonc",
"deno.lint": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[json]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[jsonc]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"backport": "deno2node tsconfig.json"
},
"dependencies": {
"@grammyjs/types": "3.4.6",
"@grammyjs/types": "3.5.1",
"abort-controller": "^3.0.0",
"debug": "^4.3.4",
"node-fetch": "^2.7.0"
Expand Down
4 changes: 4 additions & 0 deletions src/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,17 @@ const COMMON_MESSAGE_KEYS = {
} as const;
const MESSAGE_KEYS = {
...COMMON_MESSAGE_KEYS,

sender_boost_count: {},

new_chat_members: USER_KEYS,
left_chat_member: USER_KEYS,
group_chat_created: {},
supergroup_chat_created: {},
migrate_to_chat_id: {},
migrate_from_chat_id: {},
successful_payment: {},
boost_added: {},
users_shared: {},
chat_shared: {},
connected_website: {},
Expand Down
4 changes: 2 additions & 2 deletions src/types.deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
type InputMediaVideo as InputMediaVideoF,
type InputSticker as InputStickerF,
type Opts as OptsF,
} from "https://deno.land/x/grammy_types@v3.4.6/mod.ts";
} from "https://deno.land/x/grammy_types@v3.5.1/mod.ts";
import { debug as d, isDeno } from "./platform.deno.ts";

const debug = d("grammy:warn");

// === Export all API types
export * from "https://deno.land/x/grammy_types@v3.4.6/mod.ts";
export * from "https://deno.land/x/grammy_types@v3.5.1/mod.ts";

/** A value, or a potentially async function supplying that value */
type MaybeSupplier<T> = T | (() => T | Promise<T>);
Expand Down
4 changes: 2 additions & 2 deletions src/types.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
type InputMediaVideo as InputMediaVideoF,
type InputSticker as InputStickerF,
type Opts as OptsF,
} from "https://deno.land/x/grammy_types@v3.4.6/mod.ts";
} from "https://deno.land/x/grammy_types@v3.5.1/mod.ts";

// === Export all API types
export * from "https://deno.land/x/grammy_types@v3.4.6/mod.ts";
export * from "https://deno.land/x/grammy_types@v3.5.1/mod.ts";

/** Something that looks like a URL. */
interface URLLike {
Expand Down

0 comments on commit 85b3c41

Please sign in to comment.