Skip to content

Commit

Permalink
feat: support Bot API 7.3 (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
KnorpelSenf committed May 9, 2024
1 parent c1c7d8c commit 16426d5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
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.6.2",
"@grammyjs/types": "3.7.0",
"abort-controller": "^3.0.0",
"debug": "^4.3.4",
"node-fetch": "^2.7.0"
Expand Down
3 changes: 2 additions & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
type InputMediaDocument,
type InputMediaPhoto,
type InputMediaVideo,
type InputPollOption,
type LabeledPrice,
type Message,
type MessageEntity,
Expand Down Expand Up @@ -1331,7 +1332,7 @@ export class Context implements RenamedUpdate {
*/
replyWithPoll(
question: string,
options: readonly string[],
options: InputPollOption[],
other?: Other<"sendPoll", "chat_id" | "question" | "options">,
signal?: AbortSignal,
) {
Expand Down
3 changes: 2 additions & 1 deletion src/core/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
type InputMediaDocument,
type InputMediaPhoto,
type InputMediaVideo,
type InputPollOption,
type InputSticker,
type LabeledPrice,
type MaskPosition,
Expand Down Expand Up @@ -717,7 +718,7 @@ export class Api<R extends RawApi = RawApi> {
sendPoll(
chat_id: number | string,
question: string,
options: readonly string[],
options: InputPollOption[],
other?: Other<R, "sendPoll", "chat_id" | "question" | "options">,
signal?: AbortSignal,
) {
Expand Down
1 change: 1 addition & 0 deletions src/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ const COMMON_MESSAGE_KEYS = {
delete_chat_photo: {},
message_auto_delete_timer_changed: {},
pinned_message: {},
chat_background_set: {},
invoice: {},
proximity_alert_triggered: {},
video_chat_scheduled: {},
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.6.2/mod.ts";
} from "https://deno.land/x/grammy_types@v3.7.0/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.6.2/mod.ts";
export * from "https://deno.land/x/grammy_types@v3.7.0/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.6.2/mod.ts";
} from "https://deno.land/x/grammy_types@v3.7.0/mod.ts";

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

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

0 comments on commit 16426d5

Please sign in to comment.