This commit is contained in:
Lukian LEIZOUR 2022-11-19 01:49:12 +01:00
parent be4fd23bcf
commit 0bd53741af
728 changed files with 86573 additions and 0 deletions

22
node_modules/telegraf/typings/button.d.ts generated vendored Normal file
View file

@ -0,0 +1,22 @@
import { InlineKeyboardButton, KeyboardButton } from './core/types/typegram';
declare type Hideable<B> = B & {
hide: boolean;
};
export declare function text(text: string, hide?: boolean): Hideable<KeyboardButton.CommonButton>;
export declare function contactRequest(text: string, hide?: boolean): Hideable<KeyboardButton.RequestContactButton>;
export declare function locationRequest(text: string, hide?: boolean): Hideable<KeyboardButton.RequestLocationButton>;
export declare function pollRequest(text: string, type?: 'quiz' | 'regular', hide?: boolean): Hideable<KeyboardButton.RequestPollButton>;
export declare function url(text: string, url: string, hide?: boolean): Hideable<InlineKeyboardButton.UrlButton>;
export declare function callback(text: string, data: string, hide?: boolean): Hideable<InlineKeyboardButton.CallbackButton>;
export declare function switchToChat(text: string, value: string, hide?: boolean): Hideable<InlineKeyboardButton.SwitchInlineButton>;
export declare function switchToCurrentChat(text: string, value: string, hide?: boolean): Hideable<InlineKeyboardButton.SwitchInlineCurrentChatButton>;
export declare function game(text: string, hide?: boolean): Hideable<InlineKeyboardButton.GameButton>;
export declare function pay(text: string, hide?: boolean): Hideable<InlineKeyboardButton.PayButton>;
export declare function login(text: string, url: string, opts?: {
forward_text?: string;
bot_username?: string;
request_write_access?: boolean;
}, hide?: boolean): Hideable<InlineKeyboardButton.LoginButton>;
export declare function webApp(text: string, url: string, hide?: boolean): Hideable<InlineKeyboardButton.WebAppButton>;
export {};
//# sourceMappingURL=button.d.ts.map

1
node_modules/telegraf/typings/button.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE5E,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAExC,wBAAgB,IAAI,CAClB,IAAI,EAAE,MAAM,EACZ,IAAI,UAAQ,GACX,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAEvC;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,UAAQ,GACX,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAE/C;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,IAAI,UAAQ,GACX,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAEhD;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,UAAQ,GACX,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAE5C;AAED,wBAAgB,GAAG,CACjB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAE1C;AAED,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAE/C;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAEnD;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,6BAA6B,CAAC,CAE9D;AAED,wBAAgB,IAAI,CAClB,IAAI,EAAE,MAAM,EACZ,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAE3C;AAED,wBAAgB,GAAG,CACjB,IAAI,EAAE,MAAM,EACZ,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAE1C;AAED,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,IAAI,GAAE;IACJ,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC1B,EACN,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAM5C;AAED,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,IAAI,UAAQ,GACX,QAAQ,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAM7C"}

221
node_modules/telegraf/typings/composer.d.ts generated vendored Normal file
View file

@ -0,0 +1,221 @@
/** @format */
import * as tg from './core/types/typegram';
import * as tt from './telegram-types';
import { Middleware, MiddlewareFn, MiddlewareObj } from './middleware';
import Context from './context';
import { Expand } from './util';
export declare type MaybeArray<T> = T | T[];
export declare type MaybePromise<T> = T | Promise<T>;
export declare type NonemptyReadonlyArray<T> = readonly [T, ...T[]];
export declare type Triggers<C> = MaybeArray<string | RegExp | ((value: string, ctx: C) => RegExpExecArray | null)>;
export declare type Predicate<T> = (t: T) => boolean;
export declare type AsyncPredicate<T> = (t: T) => Promise<boolean>;
export declare type MatchedMiddleware<C extends Context, T extends tt.UpdateType | tt.MessageSubType = 'message' | 'channel_post'> = NonemptyReadonlyArray<Middleware<MatchedContext<C & {
match: RegExpExecArray;
}, T>>>;
/** Takes: a context type and an update type (or message subtype).
Produces: a context that has some properties required, and some undefined.
The required ones are those that are always present when the given update (or message) arrives.
The undefined ones are those that are always absent when the given update (or message) arrives. */
/** @deprecated */
declare type MatchedContext<C extends Context, T extends tt.UpdateType | tt.MessageSubType> = NarrowedContext<C, tt.MountMap[T]>;
/**
* Narrows down `C['update']` (and derived getters)
* to specific update type `U`.
*
* Used by [[`Composer`]],
* possibly useful for splitting a bot into multiple files.
*/
export declare type NarrowedContext<C extends Context, U extends tg.Update> = Context<U> & Omit<C, keyof Context>;
export interface GameQueryUpdate extends tg.Update.CallbackQueryUpdate {
callback_query: Expand<Omit<tg.CallbackQuery, 'data'> & {
game_short_name: NonNullable<tg.CallbackQuery['game_short_name']>;
}>;
}
export declare class Composer<C extends Context> implements MiddlewareObj<C> {
private handler;
constructor(...fns: ReadonlyArray<Middleware<C>>);
/**
* Registers a middleware.
*/
use(...fns: ReadonlyArray<Middleware<C>>): this;
/**
* Registers middleware for handling updates
* matching given type guard function.
*/
guard<U extends tg.Update>(guardFn: (update: tg.Update) => update is U, ...fns: NonemptyReadonlyArray<Middleware<NarrowedContext<C, U>>>): this;
/**
* Registers middleware for handling provided update types.
*/
on<T extends tt.UpdateType | tt.MessageSubType>(updateType: MaybeArray<T>, ...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, T>>>): this;
/**
* Registers middleware for handling matching text messages.
*/
hears(triggers: Triggers<C>, ...fns: MatchedMiddleware<C, 'text'>): this;
/**
* Registers middleware for handling specified commands.
*/
command(command: MaybeArray<string>, ...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, 'text'>>>): this;
/**
* Registers middleware for handling matching callback queries.
*/
action(triggers: Triggers<C>, ...fns: MatchedMiddleware<C, 'callback_query'>): this;
/**
* Registers middleware for handling matching inline queries.
*/
inlineQuery(triggers: Triggers<C>, ...fns: MatchedMiddleware<C, 'inline_query'>): this;
/**
* Registers middleware for handling game queries
*/
gameQuery(...fns: NonemptyReadonlyArray<Middleware<NarrowedContext<C, GameQueryUpdate>>>): this;
/**
* Registers middleware for dropping matching updates.
*/
drop(predicate: Predicate<C>): this;
filter(predicate: Predicate<C>): this;
private entity;
email(email: Triggers<C>, ...fns: MatchedMiddleware<C>): this;
url(url: Triggers<C>, ...fns: MatchedMiddleware<C>): this;
textLink(link: Triggers<C>, ...fns: MatchedMiddleware<C>): this;
textMention(mention: Triggers<C>, ...fns: MatchedMiddleware<C>): this;
mention(mention: MaybeArray<string>, ...fns: MatchedMiddleware<C>): this;
phone(number: Triggers<C>, ...fns: MatchedMiddleware<C>): this;
hashtag(hashtag: MaybeArray<string>, ...fns: MatchedMiddleware<C>): this;
cashtag(cashtag: MaybeArray<string>, ...fns: MatchedMiddleware<C>): this;
spoiler(text: Triggers<C>, ...fns: MatchedMiddleware<C>): this;
/**
* Registers a middleware for handling /start
*/
start(...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, 'text'> & {
startPayload: string;
}>>): this;
/**
* Registers a middleware for handling /help
*/
help(...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, 'text'>>>): this;
/**
* Registers a middleware for handling /settings
*/
settings(...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, 'text'>>>): this;
middleware(): MiddlewareFn<C>;
static reply(...args: Parameters<Context['reply']>): MiddlewareFn<Context>;
static catch<C extends Context>(errorHandler: (err: unknown, ctx: C) => void, ...fns: ReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
/**
* Generates middleware that runs in the background.
*/
static fork<C extends Context>(middleware: Middleware<C>): MiddlewareFn<C>;
static tap<C extends Context>(middleware: Middleware<C>): MiddlewareFn<C>;
/**
* Generates middleware that gives up control to the next middleware.
*/
static passThru(): MiddlewareFn<Context>;
static lazy<C extends Context>(factoryFn: (ctx: C) => MaybePromise<Middleware<C>>): MiddlewareFn<C>;
static log(logFn?: (s: string) => void): MiddlewareFn<Context>;
/**
* @param trueMiddleware middleware to run if the predicate returns true
* @param falseMiddleware middleware to run if the predicate returns false
*/
static branch<C extends Context>(predicate: Predicate<C> | AsyncPredicate<C>, trueMiddleware: Middleware<C>, falseMiddleware: Middleware<C>): MiddlewareFn<C>;
/**
* Generates optional middleware.
* @param predicate predicate to decide on a context object whether to run the middleware
* @param middleware middleware to run if the predicate returns true
*/
static optional<C extends Context>(predicate: Predicate<C> | AsyncPredicate<C>, ...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
static filter<C extends Context>(predicate: Predicate<C>): MiddlewareFn<C>;
/**
* Generates middleware for dropping matching updates.
*/
static drop<C extends Context>(predicate: Predicate<C>): MiddlewareFn<C>;
static dispatch<C extends Context, Handlers extends Record<string | number | symbol, Middleware<C>>>(routeFn: (ctx: C) => MaybePromise<keyof Handlers>, handlers: Handlers): Middleware<C>;
/**
* Generates optional middleware based on a predicate that only operates on `ctx.update`.
*
* Example:
* ```ts
* import { Composer, Update } from 'telegraf'
*
* const predicate = (u): u is Update.MessageUpdate => 'message' in u
* const middleware = Composer.guard(predicate, (ctx) => {
* const message = ctx.update.message
* })
* ```
*
* Note that `Composer.on('message')` is preferred over this.
*
* @param guardFn predicate to decide whether to run the middleware based on the `ctx.update` object
* @param fns middleware to run if the predicate returns true
* @see `Composer.optional` for a more generic version of this method that allows the predicate to operate on `ctx` itself
*/
static guard<C extends Context, U extends tg.Update>(guardFn: (u: tg.Update) => u is U, ...fns: NonemptyReadonlyArray<Middleware<NarrowedContext<C, U>>>): MiddlewareFn<C>;
/**
* Generates middleware for handling provided update types.
* @deprecated use `Composer.on`
*/
static mount<C extends Context, T extends tt.UpdateType | tt.MessageSubType>(updateType: MaybeArray<T>, ...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, T>>>): MiddlewareFn<C>;
/**
* Generates middleware for handling provided update types.
*/
static on<C extends Context, T extends tt.UpdateType | tt.MessageSubType>(updateType: MaybeArray<T>, ...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, T>>>): MiddlewareFn<C>;
private static entity;
static entityText<C extends Context>(entityType: MaybeArray<string>, predicate: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static email<C extends Context>(email: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static phone<C extends Context>(number: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static url<C extends Context>(url: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static textLink<C extends Context>(link: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static textMention<C extends Context>(mention: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static mention<C extends Context>(mention: MaybeArray<string>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static hashtag<C extends Context>(hashtag: MaybeArray<string>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static cashtag<C extends Context>(cashtag: MaybeArray<string>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
static spoiler<C extends Context>(text: Triggers<C>, ...fns: MatchedMiddleware<C>): MiddlewareFn<C>;
private static match;
/**
* Generates middleware for handling matching text messages.
*/
static hears<C extends Context>(triggers: Triggers<C>, ...fns: MatchedMiddleware<C, 'text'>): MiddlewareFn<C>;
/**
* Generates middleware for handling specified commands.
*/
static command<C extends Context>(command: MaybeArray<string>, ...fns: NonemptyReadonlyArray<Middleware<MatchedContext<C, 'text'>>>): MiddlewareFn<C>;
/**
* Generates middleware for handling matching callback queries.
*/
static action<C extends Context>(triggers: Triggers<C>, ...fns: MatchedMiddleware<C, 'callback_query'>): MiddlewareFn<C>;
/**
* Generates middleware for handling matching inline queries.
*/
static inlineQuery<C extends Context>(triggers: Triggers<C>, ...fns: MatchedMiddleware<C, 'inline_query'>): MiddlewareFn<C>;
/**
* Generates middleware responding only to specified users.
*/
static acl<C extends Context>(userId: MaybeArray<number>, ...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
private static memberStatus;
/**
* Generates middleware responding only to chat admins and chat creator.
*/
static admin<C extends Context>(...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
/**
* Generates middleware responding only to chat creator.
*/
static creator<C extends Context>(...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
/**
* Generates middleware running only in specified chat types.
*/
static chatType<C extends Context>(type: MaybeArray<tg.Chat['type']>, ...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
/**
* Generates middleware running only in private chats.
*/
static privateChat<C extends Context>(...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
/**
* Generates middleware running only in groups and supergroups.
*/
static groupChat<C extends Context>(...fns: NonemptyReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
/**
* Generates middleware for handling game queries.
*/
static gameQuery<C extends Context>(...fns: NonemptyReadonlyArray<Middleware<NarrowedContext<C, GameQueryUpdate>>>): MiddlewareFn<C>;
static unwrap<C extends Context>(handler: Middleware<C>): MiddlewareFn<C>;
static compose<C extends Context>(middlewares: ReadonlyArray<Middleware<C>>): MiddlewareFn<C>;
}
export default Composer;
//# sourceMappingURL=composer.d.ts.map

1
node_modules/telegraf/typings/composer.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

470
node_modules/telegraf/typings/context.d.ts generated vendored Normal file
View file

@ -0,0 +1,470 @@
import * as tg from './core/types/typegram';
import * as tt from './telegram-types';
import { Deunionize, PropOr, UnionKeys } from './deunionize';
import ApiClient from './core/network/client';
import Telegram from './telegram';
declare type Tail<T> = T extends [unknown, ...infer U] ? U : never;
declare type Shorthand<FName extends Exclude<keyof Telegram, keyof ApiClient>> = Tail<Parameters<Telegram[FName]>>;
export declare class Context<U extends Deunionize<tg.Update> = tg.Update> {
readonly update: U;
readonly telegram: Telegram;
readonly botInfo: tg.UserFromGetMe;
readonly state: Record<string | symbol, any>;
constructor(update: U, telegram: Telegram, botInfo: tg.UserFromGetMe);
get updateType(): Extract<UnionKeys<U>, tt.UpdateType>;
get me(): string;
/**
* @deprecated Use ctx.telegram instead
*/
get tg(): Telegram;
get message(): PropOr<U, "message", undefined>;
get editedMessage(): PropOr<U, "edited_message", undefined>;
get inlineQuery(): PropOr<U, "inline_query", undefined>;
get shippingQuery(): PropOr<U, "shipping_query", undefined>;
get preCheckoutQuery(): PropOr<U, "pre_checkout_query", undefined>;
get chosenInlineResult(): PropOr<U, "chosen_inline_result", undefined>;
get channelPost(): PropOr<U, "channel_post", undefined>;
get editedChannelPost(): PropOr<U, "edited_channel_post", undefined>;
get callbackQuery(): PropOr<U, "callback_query", undefined>;
get poll(): PropOr<U, "poll", undefined>;
get pollAnswer(): PropOr<U, "poll_answer", undefined>;
get myChatMember(): PropOr<U, "my_chat_member", undefined>;
get chatMember(): PropOr<U, "chat_member", undefined>;
get chatJoinRequest(): tg.ChatJoinRequest | undefined;
get chat(): Getter<U, 'chat'>;
get senderChat(): PropOr<GetUpdateContent<U>, "sender_chat", undefined>;
get from(): PropOr<GetUpdateContent<U>, "from", undefined>;
get inlineMessageId(): string | undefined;
get passportData(): tg.PassportData | undefined;
get webAppData(): {
data: {
json<T>(): T;
text(): string;
};
button_text: string;
} | undefined;
/**
* @deprecated use {@link Telegram.webhookReply}
*/
get webhookReply(): boolean;
set webhookReply(enable: boolean);
/**
* @see https://core.telegram.org/bots/api#answerinlinequery
*/
answerInlineQuery(this: Context, ...args: Shorthand<'answerInlineQuery'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#answercallbackquery
*/
answerCbQuery(this: Context, ...args: Shorthand<'answerCbQuery'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#answercallbackquery
*/
answerGameQuery(this: Context, ...args: Shorthand<'answerGameQuery'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#answershippingquery
*/
answerShippingQuery(this: Context, ...args: Shorthand<'answerShippingQuery'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#answerprecheckoutquery
*/
answerPreCheckoutQuery(this: Context, ...args: Shorthand<'answerPreCheckoutQuery'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#editmessagetext
*/
editMessageText(this: Context, text: string, extra?: tt.ExtraEditMessageText): Promise<true | (tg.Update.Edited & tg.Message.TextMessage)>;
/**
* @see https://core.telegram.org/bots/api#editmessagecaption
*/
editMessageCaption(this: Context, caption: string | undefined, extra?: tt.ExtraEditMessageCaption): Promise<true | (tg.Update.Edited & tg.Message.CaptionableMessage)>;
/**
* @see https://core.telegram.org/bots/api#editmessagemedia
*/
editMessageMedia(this: Context, media: tg.InputMedia, extra?: tt.ExtraEditMessageMedia): Promise<true | (tg.Update.Edited & tg.Message.AnimationMessage) | (tg.Update.Edited & tg.Message.DocumentMessage) | (tg.Update.Edited & tg.Message.AudioMessage) | (tg.Update.Edited & tg.Message.PhotoMessage) | (tg.Update.Edited & tg.Message.VideoMessage)>;
/**
* @see https://core.telegram.org/bots/api#editmessagereplymarkup
*/
editMessageReplyMarkup(this: Context, markup: tg.InlineKeyboardMarkup | undefined): Promise<true | (tg.Update.Edited & tg.Message)>;
/**
* @see https://core.telegram.org/bots/api#editmessagelivelocation
*/
editMessageLiveLocation(this: Context, latitude: number, longitude: number, extra?: tt.ExtraEditMessageLiveLocation): Promise<true | (tg.Update.Edited & tg.Message.LocationMessage)>;
/**
* @see https://core.telegram.org/bots/api#stopmessagelivelocation
*/
stopMessageLiveLocation(this: Context, markup?: tg.InlineKeyboardMarkup): Promise<true | (tg.Update.Edited & tg.Message.LocationMessage)>;
/**
* @see https://core.telegram.org/bots/api#sendmessage
*/
sendMessage(this: Context, ...args: Shorthand<'sendMessage'>): Promise<tg.Message.TextMessage>;
/**
* @see https://core.telegram.org/bots/api#sendmessage
*/
reply(this: Context, ...args: Shorthand<'sendMessage'>): Promise<tg.Message.TextMessage>;
/**
* @see https://core.telegram.org/bots/api#getchat
*/
getChat(this: Context, ...args: Shorthand<'getChat'>): Promise<tg.ChatFromGetChat>;
/**
* @see https://core.telegram.org/bots/api#exportchatinvitelink
*/
exportChatInviteLink(this: Context, ...args: Shorthand<'exportChatInviteLink'>): Promise<string>;
/**
* @see https://core.telegram.org/bots/api#createchatinvitelink
*/
createChatInviteLink(this: Context, ...args: Shorthand<'createChatInviteLink'>): Promise<tg.ChatInviteLink>;
/**
* @see https://core.telegram.org/bots/api#editchatinvitelink
*/
editChatInviteLink(this: Context, ...args: Shorthand<'editChatInviteLink'>): Promise<tg.ChatInviteLink>;
/**
* @see https://core.telegram.org/bots/api#revokechatinvitelink
*/
revokeChatInviteLink(this: Context, ...args: Shorthand<'revokeChatInviteLink'>): Promise<tg.ChatInviteLink>;
/**
* @see https://core.telegram.org/bots/api#banchatmember
*/
banChatMember(this: Context, ...args: Shorthand<'banChatMember'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#banchatmember
* @deprecated since API 5.3. Use {@link Context.banChatMember}
*/
get kickChatMember(): (this: Context<tg.Update>, userId: number, untilDate?: number | undefined, extra?: Omit<{
chat_id: string | number;
user_id: number;
until_date?: number | undefined;
revoke_messages?: boolean | undefined;
}, "chat_id" | "user_id" | "until_date"> | undefined) => Promise<true>;
/**
* @see https://core.telegram.org/bots/api#unbanchatmember
*/
unbanChatMember(this: Context, ...args: Shorthand<'unbanChatMember'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#restrictchatmember
*/
restrictChatMember(this: Context, ...args: Shorthand<'restrictChatMember'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#promotechatmember
*/
promoteChatMember(this: Context, ...args: Shorthand<'promoteChatMember'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#setchatadministratorcustomtitle
*/
setChatAdministratorCustomTitle(this: Context, ...args: Shorthand<'setChatAdministratorCustomTitle'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#setchatphoto
*/
setChatPhoto(this: Context, ...args: Shorthand<'setChatPhoto'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#deletechatphoto
*/
deleteChatPhoto(this: Context, ...args: Shorthand<'deleteChatPhoto'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#setchattitle
*/
setChatTitle(this: Context, ...args: Shorthand<'setChatTitle'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#setchatdescription
*/
setChatDescription(this: Context, ...args: Shorthand<'setChatDescription'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#pinchatmessage
*/
pinChatMessage(this: Context, ...args: Shorthand<'pinChatMessage'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#unpinchatmessage
*/
unpinChatMessage(this: Context, ...args: Shorthand<'unpinChatMessage'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#unpinallchatmessages
*/
unpinAllChatMessages(this: Context, ...args: Shorthand<'unpinAllChatMessages'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#leavechat
*/
leaveChat(this: Context, ...args: Shorthand<'leaveChat'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#setchatpermissions
*/
setChatPermissions(this: Context, ...args: Shorthand<'setChatPermissions'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#getchatadministrators
*/
getChatAdministrators(this: Context, ...args: Shorthand<'getChatAdministrators'>): Promise<(tg.ChatMemberOwner | tg.ChatMemberAdministrator)[]>;
/**
* @see https://core.telegram.org/bots/api#getchatmember
*/
getChatMember(this: Context, ...args: Shorthand<'getChatMember'>): Promise<tg.ChatMember>;
/**
* @see https://core.telegram.org/bots/api#getchatmembercount
*/
getChatMembersCount(this: Context, ...args: Shorthand<'getChatMembersCount'>): Promise<number>;
/**
* @see https://core.telegram.org/bots/api#setpassportdataerrors
*/
setPassportDataErrors(this: Context, errors: readonly tg.PassportElementError[]): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#sendphoto
*/
sendPhoto(this: Context, ...args: Shorthand<'sendPhoto'>): Promise<tg.Message.PhotoMessage>;
/**
* @see https://core.telegram.org/bots/api#sendphoto
*/
replyWithPhoto(this: Context, ...args: Shorthand<'sendPhoto'>): Promise<tg.Message.PhotoMessage>;
/**
* @see https://core.telegram.org/bots/api#sendmediagroup
*/
sendMediaGroup(this: Context, ...args: Shorthand<'sendMediaGroup'>): Promise<(tg.Message.DocumentMessage | tg.Message.AudioMessage | tg.Message.PhotoMessage | tg.Message.VideoMessage)[]>;
/**
* @see https://core.telegram.org/bots/api#sendmediagroup
*/
replyWithMediaGroup(this: Context, ...args: Shorthand<'sendMediaGroup'>): Promise<(tg.Message.DocumentMessage | tg.Message.AudioMessage | tg.Message.PhotoMessage | tg.Message.VideoMessage)[]>;
/**
* @see https://core.telegram.org/bots/api#sendaudio
*/
sendAudio(this: Context, ...args: Shorthand<'sendAudio'>): Promise<tg.Message.AudioMessage>;
/**
* @see https://core.telegram.org/bots/api#sendaudio
*/
replyWithAudio(this: Context, ...args: Shorthand<'sendAudio'>): Promise<tg.Message.AudioMessage>;
/**
* @see https://core.telegram.org/bots/api#senddice
*/
sendDice(this: Context, ...args: Shorthand<'sendDice'>): Promise<tg.Message.DiceMessage>;
/**
* @see https://core.telegram.org/bots/api#senddice
*/
replyWithDice(this: Context, ...args: Shorthand<'sendDice'>): Promise<tg.Message.DiceMessage>;
/**
* @see https://core.telegram.org/bots/api#senddocument
*/
sendDocument(this: Context, ...args: Shorthand<'sendDocument'>): Promise<tg.Message.DocumentMessage>;
/**
* @see https://core.telegram.org/bots/api#senddocument
*/
replyWithDocument(this: Context, ...args: Shorthand<'sendDocument'>): Promise<tg.Message.DocumentMessage>;
/**
* @see https://core.telegram.org/bots/api#sendsticker
*/
sendSticker(this: Context, ...args: Shorthand<'sendSticker'>): Promise<tg.Message.StickerMessage>;
/**
* @see https://core.telegram.org/bots/api#sendsticker
*/
replyWithSticker(this: Context, ...args: Shorthand<'sendSticker'>): Promise<tg.Message.StickerMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvideo
*/
sendVideo(this: Context, ...args: Shorthand<'sendVideo'>): Promise<tg.Message.VideoMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvideo
*/
replyWithVideo(this: Context, ...args: Shorthand<'sendVideo'>): Promise<tg.Message.VideoMessage>;
/**
* @see https://core.telegram.org/bots/api#sendanimation
*/
sendAnimation(this: Context, ...args: Shorthand<'sendAnimation'>): Promise<tg.Message.AnimationMessage>;
/**
* @see https://core.telegram.org/bots/api#sendanimation
*/
replyWithAnimation(this: Context, ...args: Shorthand<'sendAnimation'>): Promise<tg.Message.AnimationMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvideonote
*/
sendVideoNote(this: Context, ...args: Shorthand<'sendVideoNote'>): Promise<tg.Message.VideoNoteMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvideonote
*/
replyWithVideoNote(this: Context, ...args: Shorthand<'sendVideoNote'>): Promise<tg.Message.VideoNoteMessage>;
/**
* @see https://core.telegram.org/bots/api#sendinvoice
*/
sendInvoice(this: Context, ...args: Shorthand<'sendInvoice'>): Promise<tg.Message.InvoiceMessage>;
/**
* @see https://core.telegram.org/bots/api#sendinvoice
*/
replyWithInvoice(this: Context, ...args: Shorthand<'sendInvoice'>): Promise<tg.Message.InvoiceMessage>;
/**
* @see https://core.telegram.org/bots/api#sendgame
*/
sendGame(this: Context, ...args: Shorthand<'sendGame'>): Promise<tg.Message.GameMessage>;
/**
* @see https://core.telegram.org/bots/api#sendgame
*/
replyWithGame(this: Context, ...args: Shorthand<'sendGame'>): Promise<tg.Message.GameMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvoice
*/
sendVoice(this: Context, ...args: Shorthand<'sendVoice'>): Promise<tg.Message.VoiceMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvoice
*/
replyWithVoice(this: Context, ...args: Shorthand<'sendVoice'>): Promise<tg.Message.VoiceMessage>;
/**
* @see https://core.telegram.org/bots/api#sendpoll
*/
sendPoll(this: Context, ...args: Shorthand<'sendPoll'>): Promise<tg.Message.PollMessage>;
/**
* @see https://core.telegram.org/bots/api#sendpoll
*/
replyWithPoll(this: Context, ...args: Shorthand<'sendPoll'>): Promise<tg.Message.PollMessage>;
/**
* @see https://core.telegram.org/bots/api#sendquiz
*/
sendQuiz(this: Context, ...args: Shorthand<'sendQuiz'>): Promise<tg.Message.PollMessage>;
/**
* @see https://core.telegram.org/bots/api#sendquiz
*/
replyWithQuiz(this: Context, ...args: Shorthand<'sendQuiz'>): Promise<tg.Message.PollMessage>;
/**
* @see https://core.telegram.org/bots/api#stoppoll
*/
stopPoll(this: Context, ...args: Shorthand<'stopPoll'>): Promise<tg.Poll>;
/**
* @see https://core.telegram.org/bots/api#sendchataction
*/
sendChatAction(this: Context, ...args: Shorthand<'sendChatAction'>): Promise<true>;
/**
* @deprecated use {@link Context.sendChatAction} instead
* @see https://core.telegram.org/bots/api#sendchataction
*/
replyWithChatAction(this: Context, ...args: Shorthand<'sendChatAction'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#sendlocation
*/
sendLocation(this: Context, ...args: Shorthand<'sendLocation'>): Promise<tg.Message.LocationMessage>;
/**
* @see https://core.telegram.org/bots/api#sendlocation
*/
replyWithLocation(this: Context, ...args: Shorthand<'sendLocation'>): Promise<tg.Message.LocationMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvenue
*/
sendVenue(this: Context, ...args: Shorthand<'sendVenue'>): Promise<tg.Message.VenueMessage>;
/**
* @see https://core.telegram.org/bots/api#sendvenue
*/
replyWithVenue(this: Context, ...args: Shorthand<'sendVenue'>): Promise<tg.Message.VenueMessage>;
/**
* @see https://core.telegram.org/bots/api#sendcontact
*/
sendContact(this: Context, ...args: Shorthand<'sendContact'>): Promise<tg.Message.ContactMessage>;
/**
* @see https://core.telegram.org/bots/api#sendcontact
*/
replyWithContact(this: Context, ...args: Shorthand<'sendContact'>): Promise<tg.Message.ContactMessage>;
/**
* @deprecated use {@link Telegram.getStickerSet}
* @see https://core.telegram.org/bots/api#getstickerset
*/
getStickerSet(this: Context, setName: string): Promise<tg.StickerSet>;
/**
* @see https://core.telegram.org/bots/api#setchatstickerset
*/
setChatStickerSet(this: Context, setName: string): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#deletechatstickerset
*/
deleteChatStickerSet(this: Context): Promise<true>;
/**
* @deprecated use {@link Telegram.setStickerPositionInSet}
* @see https://core.telegram.org/bots/api#setstickerpositioninset
*/
setStickerPositionInSet(this: Context, sticker: string, position: number): Promise<true>;
/**
* @deprecated use {@link Telegram.setStickerSetThumb}
* @see https://core.telegram.org/bots/api#setstickersetthumb
*/
setStickerSetThumb(this: Context, ...args: Parameters<Telegram['setStickerSetThumb']>): Promise<true>;
/**
* @deprecated use {@link Telegram.deleteStickerFromSet}
* @see https://core.telegram.org/bots/api#deletestickerfromset
*/
deleteStickerFromSet(this: Context, sticker: string): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#uploadstickerfile
*/
uploadStickerFile(this: Context, ...args: Shorthand<'uploadStickerFile'>): Promise<tg.File>;
/**
* @see https://core.telegram.org/bots/api#createnewstickerset
*/
createNewStickerSet(this: Context, ...args: Shorthand<'createNewStickerSet'>): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#addstickertoset
*/
addStickerToSet(this: Context, ...args: Shorthand<'addStickerToSet'>): Promise<true>;
/**
* @deprecated use {@link Telegram.getMyCommands}
* @see https://core.telegram.org/bots/api#getmycommands
*/
getMyCommands(this: Context): Promise<tg.BotCommand[]>;
/**
* @deprecated use {@link Telegram.setMyCommands}
* @see https://core.telegram.org/bots/api#setmycommands
*/
setMyCommands(this: Context, commands: readonly tg.BotCommand[]): Promise<true>;
/**
* @deprecated use {@link Context.replyWithMarkdownV2}
* @see https://core.telegram.org/bots/api#sendmessage
*/
replyWithMarkdown(this: Context, markdown: string, extra?: tt.ExtraReplyMessage): Promise<tg.Message.TextMessage>;
/**
* @see https://core.telegram.org/bots/api#sendmessage
*/
replyWithMarkdownV2(this: Context, markdown: string, extra?: tt.ExtraReplyMessage): Promise<tg.Message.TextMessage>;
/**
* @see https://core.telegram.org/bots/api#sendmessage
*/
replyWithHTML(this: Context, html: string, extra?: tt.ExtraReplyMessage): Promise<tg.Message.TextMessage>;
/**
* @see https://core.telegram.org/bots/api#deletemessage
*/
deleteMessage(this: Context, messageId?: number): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#forwardmessage
*/
forwardMessage(this: Context, chatId: string | number, extra?: {
disable_notification?: boolean;
}): Promise<tg.Message>;
/**
* @see https://core.telegram.org/bots/api#copymessage
*/
copyMessage(this: Context, chatId: string | number, extra?: tt.ExtraCopyMessage): Promise<tg.MessageId>;
/**
* @see https://core.telegram.org/bots/api#approvechatjoinrequest
*/
approveChatJoinRequest(this: Context, userId: number): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#declinechatjoinrequest
*/
declineChatJoinRequest(this: Context, userId: number): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#banchatsenderchat
*/
banChatSenderChat(this: Context, senderChatId: number): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#unbanchatsenderchat
*/
unbanChatSenderChat(this: Context, senderChatId: number): Promise<true>;
/**
* Use this method to change the bot's menu button in the current private chat. Returns true on success.
* @see https://core.telegram.org/bots/api#setchatmenubutton
*/
setChatMenuButton(this: Context, menuButton?: tg.MenuButton): Promise<true>;
/**
* Use this method to get the current value of the bot's menu button in the current private chat. Returns MenuButton on success.
* @see https://core.telegram.org/bots/api#getchatmenubutton
*/
getChatMenuButton(): Promise<tg.MenuButton>;
/**
* @see https://core.telegram.org/bots/api#setmydefaultadministratorrights
*/
setMyDefaultAdministratorRights(extra?: Parameters<Telegram['setMyDefaultAdministratorRights']>[0]): Promise<true>;
/**
* @see https://core.telegram.org/bots/api#getmydefaultadministratorrights
*/
getMyDefaultAdministratorRights(extra?: Parameters<Telegram['getMyDefaultAdministratorRights']>[0]): Promise<tg.ChatAdministratorRights>;
}
export default Context;
declare type UpdateTypes<U extends Deunionize<tg.Update>> = Extract<UnionKeys<U>, tt.UpdateType>;
export declare type GetUpdateContent<U extends tg.Update> = U extends tg.Update.CallbackQueryUpdate ? U['callback_query']['message'] : U[UpdateTypes<U>];
declare type Getter<U extends Deunionize<tg.Update>, P extends string> = PropOr<GetUpdateContent<U>, P>;
//# sourceMappingURL=context.d.ts.map

1
node_modules/telegraf/typings/context.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

56
node_modules/telegraf/typings/core/helpers/check.d.ts generated vendored Normal file
View file

@ -0,0 +1,56 @@
interface Mapping {
string: string;
number: number;
bigint: bigint;
boolean: boolean;
symbol: symbol;
undefined: undefined;
object: Record<string, unknown>;
function: (...props: any[]) => any;
}
/**
* Checks if a given object has a property with a given name.
*
* Example invocation:
* ```js
* let obj = { 'foo': 'bar', 'baz': () => {} }
* hasProp(obj, 'foo') // true
* hasProp(obj, 'baz') // true
* hasProp(obj, 'abc') // false
* ```
*
* @param obj An object to test
* @param prop The name of the property
*/
export declare function hasProp<O extends object, K extends PropertyKey>(obj: O | undefined, prop: K): obj is O & Record<K, unknown>;
/**
* Checks if a given object has a property with a given name.
* Furthermore performs a `typeof` check on the property if it exists.
*
* Example invocation:
* ```js
* let obj = { 'foo': 'bar', 'baz': () => {} }
* hasPropType(obj, 'foo', 'string') // true
* hasPropType(obj, 'baz', 'function') // true
* hasPropType(obj, 'abc', 'number') // false
* ```
*
* @param obj An object to test
* @param prop The name of the property
* @param type The type the property is expected to have
*/
export declare function hasPropType<O extends object, K extends PropertyKey, T extends keyof Mapping, V extends Mapping[T]>(obj: O | undefined, prop: K, type: T): obj is O & Record<K, V>;
/**
* Checks if the supplied array has two dimensions or not.
*
* Example invocations:
* is2D([]) // false
* is2D([[]]) // true
* is2D([[], []]) // true
* is2D([42]) // false
*
* @param arr an array with one or two dimensions
*/
export declare function is2D<E>(arr: E[] | E[][]): arr is E[][];
export {};
//# sourceMappingURL=check.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/check.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE/B,QAAQ,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,WAAW,EAC7D,GAAG,EAAE,CAAC,GAAG,SAAS,EAClB,IAAI,EAAE,CAAC,GACN,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAE/B;AACD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,MAAM,OAAO,EACvB,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,EACpB,GAAG,EAAE,CAAC,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAE/D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAEtD"}

View file

@ -0,0 +1,4 @@
export declare function compactOptions<T extends {
[key: string]: unknown;
}>(options?: T): T | undefined;
//# sourceMappingURL=compact.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/compact.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EACjE,OAAO,CAAC,EAAE,CAAC,GACV,CAAC,GAAG,SAAS,CASf"}

View file

@ -0,0 +1,31 @@
import { MessageEntity, User } from 'typegram';
export interface FmtString {
text: string;
entities?: MessageEntity[];
parse_mode?: undefined;
}
export declare class FmtString implements FmtString {
text: string;
constructor(text: string, entities?: MessageEntity[]);
static normalise(content: string | FmtString): FmtString;
}
export declare namespace Types {
type Containers = 'bold' | 'italic' | 'spoiler' | 'strikethrough' | 'underline';
type NonContainers = 'code' | 'pre';
type Text = Containers | NonContainers;
}
declare type TemplateParts = string | TemplateStringsArray | string[];
export declare function _fmt(kind: Types.Containers | 'very-plain'): (parts: TemplateParts, ...items: (string | FmtString)[]) => FmtString;
export declare function _fmt(kind: Types.NonContainers): (parts: TemplateParts, ...items: string[]) => FmtString;
export declare function _fmt(kind: 'pre', opts: {
language: string;
}): (parts: TemplateParts, ...items: string[]) => FmtString;
export declare const linkOrMention: (content: string | FmtString, data: {
type: 'text_link';
url: string;
} | {
type: 'text_mention';
user: User;
}) => FmtString;
export {};
//# sourceMappingURL=formatting.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAA;CACvB;AAED,qBAAa,SAAU,YAAW,SAAS;IACtB,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,EAAE;IAO3D,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;CAI7C;AAED,yBAAiB,KAAK,CAAC;IAErB,KAAY,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,WAAW,CAAA;IACtF,KAAY,aAAa,GAAG,MAAM,GAAG,KAAK,CAAA;IAC1C,KAAY,IAAI,GAAG,UAAU,GAAG,aAAa,CAAA;CAC9C;AAED,aAAK,aAAa,GAAG,MAAM,GAAG,oBAAoB,GAAG,MAAM,EAAE,CAAA;AAE7D,wBAAgB,IAAI,CAClB,IAAI,EAAE,KAAK,CAAC,UAAU,GAAG,YAAY,GACpC,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,KAAK,SAAS,CAAA;AACxE,wBAAgB,IAAI,CAClB,IAAI,EAAE,KAAK,CAAC,aAAa,GACxB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,SAAS,CAAA;AAC1D,wBAAgB,IAAI,CAClB,IAAI,EAAE,KAAK,EACX,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,SAAS,CAAA;AAwB1D,eAAO,MAAM,aAAa,YACf,MAAM,GAAG,SAAS,QAEvB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,cAKzC,CAAA"}

54
node_modules/telegraf/typings/core/network/client.d.ts generated vendored Normal file
View file

@ -0,0 +1,54 @@
/// <reference types="node" />
/// <reference types="node" />
import * as http from 'http';
import { Opts, Telegram } from '../types/typegram';
import { AbortSignal } from 'abort-controller';
import { URL } from 'url';
declare namespace ApiClient {
type Agent = http.Agent | ((parsedUrl: URL) => http.Agent) | undefined;
interface Options {
/**
* Agent for communicating with the bot API.
*/
agent?: http.Agent;
/**
* Agent for attaching files via URL.
* 1. Not all agents support both `http:` and `https:`.
* 2. When passing a function, create the agents once, outside of the function.
* Creating new agent every request probably breaks `keepAlive`.
*/
attachmentAgent?: Agent;
apiRoot: string;
/**
* @default 'bot'
* @see https://github.com/tdlight-team/tdlight-telegram-bot-api#user-mode
*/
apiMode: 'bot' | 'user';
webhookReply: boolean;
testEnv: boolean;
}
interface CallApiOptions {
signal?: AbortSignal;
}
}
declare class ApiClient {
readonly token: string;
private readonly response?;
readonly options: ApiClient.Options;
constructor(token: string, options?: Partial<ApiClient.Options>, response?: http.ServerResponse | undefined);
/**
* If set to `true`, first _eligible_ call will avoid performing a POST request.
* Note that such a call:
* 1. cannot report errors or return meaningful values,
* 2. resolves before bot API has a chance to process it,
* 3. prematurely confirms the update as processed.
*
* https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates
* https://github.com/telegraf/telegraf/pull/1250
*/
set webhookReply(enable: boolean);
get webhookReply(): boolean;
callApi<M extends keyof Telegram>(method: M, payload: Opts<M>, { signal }?: ApiClient.CallApiOptions): Promise<ReturnType<Telegram[M]>>;
}
export default ApiClient;
//# sourceMappingURL=client.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/core/network/client.ts"],"names":[],"mappings":";;AAGA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAK5B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAK9C,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAczB,kBAAU,SAAS,CAAC;IAClB,KAAY,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;IAC7E,UAAiB,OAAO;QACtB;;WAEG;QACH,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAA;QAClB;;;;;WAKG;QACH,eAAe,CAAC,EAAE,KAAK,CAAA;QACvB,OAAO,EAAE,MAAM,CAAA;QACf;;;WAGG;QACH,OAAO,EAAE,KAAK,GAAG,MAAM,CAAA;QACvB,YAAY,EAAE,OAAO,CAAA;QACrB,OAAO,EAAE,OAAO,CAAA;KACjB;IAED,UAAiB,cAAc;QAC7B,MAAM,CAAC,EAAE,WAAW,CAAA;KACrB;CACF;AAyOD,cAAM,SAAS;IAIX,QAAQ,CAAC,KAAK,EAAE,MAAM;IAEtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAL5B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAA;gBAGxB,KAAK,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EACnB,QAAQ,CAAC,iCAAU;IAWtC;;;;;;;;;OASG;IACH,IAAI,YAAY,CAAC,MAAM,EAAE,OAAO,EAE/B;IAED,IAAI,YAAY,IAJS,OAAO,CAM/B;IAEK,OAAO,CAAC,CAAC,SAAS,MAAM,QAAQ,EACpC,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAChB,EAAE,MAAM,EAAE,GAAE,SAAS,CAAC,cAAmB,GACxC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;CAkDpC;AAED,eAAe,SAAS,CAAA"}

16
node_modules/telegraf/typings/core/network/error.d.ts generated vendored Normal file
View file

@ -0,0 +1,16 @@
import { ResponseParameters } from '../types/typegram';
interface ErrorPayload {
error_code: number;
description: string;
parameters?: ResponseParameters;
}
export declare class TelegramError extends Error {
readonly response: ErrorPayload;
readonly on: {};
constructor(response: ErrorPayload, on?: {});
get code(): number;
get description(): string;
get parameters(): ResponseParameters | undefined;
}
export default TelegramError;
//# sourceMappingURL=error.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/core/network/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,UAAU,YAAY;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC;AACD,qBAAa,aAAc,SAAQ,KAAK;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAAE,QAAQ,CAAC,EAAE;gBAAnC,QAAQ,EAAE,YAAY,EAAW,EAAE,KAAK;IAI7D,IAAI,IAAI,WAEP;IAED,IAAI,WAAW,WAEd;IAED,IAAI,UAAU,mCAEb;CACF;AAED,eAAe,aAAa,CAAA"}

View file

@ -0,0 +1,18 @@
/// <reference types="node" />
/// <reference types="node" />
import SandwichStream from 'sandwich-stream';
interface Part {
headers: {
[key: string]: string;
};
body: NodeJS.ReadStream | NodeJS.ReadableStream | string;
}
declare class MultipartStream extends SandwichStream {
constructor(boundary: string);
addPart(part: Part): void;
static isStream(stream: unknown): stream is {
pipe: MultipartStream['pipe'];
};
}
export default MultipartStream;
//# sourceMappingURL=multipart-stream.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"multipart-stream.d.ts","sourceRoot":"","sources":["../../../src/core/network/multipart-stream.ts"],"names":[],"mappings":";;AAEA,OAAO,cAAc,MAAM,iBAAiB,CAAA;AAG5C,UAAU,IAAI;IACZ,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAClC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,cAAc,GAAG,MAAM,CAAA;CACzD;AAED,cAAM,eAAgB,SAAQ,cAAc;gBAC9B,QAAQ,EAAE,MAAM;IAQ5B,OAAO,CAAC,IAAI,EAAE,IAAI;IAclB,MAAM,CAAC,QAAQ,CACb,MAAM,EAAE,OAAO,GACd,MAAM,IAAI;QAAE,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;KAAE;CAO/C;AAED,eAAe,eAAe,CAAA"}

View file

@ -0,0 +1,16 @@
import * as tg from '../types/typegram';
import * as tt from '../../telegram-types';
import ApiClient from './client';
export declare class Polling {
private readonly telegram;
private readonly allowedUpdates;
private readonly abortController;
private skipOffsetSync;
private offset;
constructor(telegram: ApiClient, allowedUpdates: readonly tt.UpdateType[]);
private [Symbol.asyncIterator];
private syncUpdateOffset;
loop(handleUpdate: (updates: tg.Update) => Promise<void>): Promise<void>;
stop(): void;
}
//# sourceMappingURL=polling.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"polling.d.ts","sourceRoot":"","sources":["../../../src/core/network/polling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE1C,OAAO,SAAS,MAAM,UAAU,CAAA;AAWhC,qBAAa,OAAO;IAKhB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,cAAc;IALjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAwB;IACxD,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,MAAM,CAAI;gBAEC,QAAQ,EAAE,SAAS,EACnB,cAAc,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE;YAG5C,CAAC,MAAM,CAAC,aAAa,CAAC;YA+CvB,gBAAgB;IAMxB,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;IAgB9D,IAAI;CAGL"}

View file

@ -0,0 +1,7 @@
/// <reference types="node" />
import * as http from 'http';
import { type Update } from '../types/typegram';
export default function generateWebhook(filter: (req: http.IncomingMessage) => boolean, updateHandler: (update: Update, res: http.ServerResponse) => Promise<void>): (req: http.IncomingMessage & {
body?: Update;
}, res: http.ServerResponse, next?: () => void) => Promise<void>;
//# sourceMappingURL=webhook.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../src/core/network/webhook.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG/C,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,eAAe,KAAK,OAAO,EAC9C,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,SAGnE,KAAK,eAAe,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,OACxC,KAAK,cAAc,eACb,IAAI,KAKd,QAAQ,IAAI,CAAC,CAwCjB"}

44
node_modules/telegraf/typings/core/types/typegram.d.ts generated vendored Normal file
View file

@ -0,0 +1,44 @@
/// <reference types="node" />
/// <reference types="node" />
import { Typegram } from 'typegram';
export * from 'typegram/api';
export * from 'typegram/markup';
export * from 'typegram/menu-button';
export * from 'typegram/inline';
export * from 'typegram/manage';
export * from 'typegram/message';
export * from 'typegram/passport';
export * from 'typegram/payment';
export * from 'typegram/update';
interface InputFileByPath {
source: string;
filename?: string;
}
interface InputFileByReadableStream {
source: NodeJS.ReadableStream;
filename?: string;
}
interface InputFileByBuffer {
source: Buffer;
filename?: string;
}
interface InputFileByURL {
url: string;
filename?: string;
}
export declare type InputFile = InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL;
declare type TelegrafTypegram = Typegram<InputFile>;
export declare type Telegram = TelegrafTypegram['Telegram'];
export declare type Opts<M extends keyof Telegram> = TelegrafTypegram['Opts'][M];
export declare type InputMedia = TelegrafTypegram['InputMedia'];
export declare type InputMediaPhoto = TelegrafTypegram['InputMediaPhoto'];
export declare type InputMediaVideo = TelegrafTypegram['InputMediaVideo'];
export declare type InputMediaAnimation = TelegrafTypegram['InputMediaAnimation'];
export declare type InputMediaAudio = TelegrafTypegram['InputMediaAudio'];
export declare type InputMediaDocument = TelegrafTypegram['InputMediaDocument'];
export declare type ChatAction = Opts<'sendChatAction'>['action'];
/**
* Sending video notes by a URL is currently unsupported
*/
export declare type InputFileVideoNote = Exclude<InputFile, InputFileByURL>;
//# sourceMappingURL=typegram.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"typegram.d.ts","sourceRoot":"","sources":["../../../src/core/types/typegram.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGnC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAG/B,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AACD,UAAU,yBAAyB;IACjC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AACD,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AACD,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AACD,oBAAY,SAAS,GACjB,eAAe,GACf,yBAAyB,GACzB,iBAAiB,GACjB,cAAc,CAAA;AAGlB,aAAK,gBAAgB,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAA;AAE3C,oBAAY,QAAQ,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAA;AACnD,oBAAY,IAAI,CAAC,CAAC,SAAS,MAAM,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACxE,oBAAY,UAAU,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAA;AACvD,oBAAY,eAAe,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;AACjE,oBAAY,eAAe,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;AACjE,oBAAY,mBAAmB,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,CAAA;AACzE,oBAAY,eAAe,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;AACjE,oBAAY,kBAAkB,GAAG,gBAAgB,CAAC,oBAAoB,CAAC,CAAA;AAGvE,oBAAY,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAA;AAEzD;;GAEG;AACH,oBAAY,kBAAkB,GAAG,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA"}

17
node_modules/telegraf/typings/deunionize.d.ts generated vendored Normal file
View file

@ -0,0 +1,17 @@
export declare type PropOr<T extends object | undefined, P extends string | symbol | number, D = undefined> = T extends Partial<Record<P, unknown>> ? T[P] : D;
export declare type UnionKeys<T> = T extends unknown ? keyof T : never;
declare type AddOptionalKeys<K extends PropertyKey> = {
readonly [P in K]?: undefined;
};
/**
* @see https://millsp.github.io/ts-toolbelt/modules/union_strict.html
*/
export declare type Deunionize<B extends object | undefined, T extends B = B> = T extends object ? T & AddOptionalKeys<Exclude<UnionKeys<B>, keyof T>> : T;
/**
* Expose properties from all union variants.
* @see https://github.com/telegraf/telegraf/issues/1388#issuecomment-791573609
* @see https://millsp.github.io/ts-toolbelt/modules/union_strict.html
*/
export declare function deunionize<T extends object | undefined>(t: T): Deunionize<T, T>;
export {};
//# sourceMappingURL=deunionize.d.ts.map

1
node_modules/telegraf/typings/deunionize.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"deunionize.d.ts","sourceRoot":"","sources":["../src/deunionize.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM,CAChB,CAAC,SAAS,MAAM,GAAG,SAAS,EAC5B,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAClC,CAAC,GAAG,SAAS,IACX,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAEpD,oBAAY,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,MAAM,CAAC,GAAG,KAAK,CAAA;AAE9D,aAAK,eAAe,CAAC,CAAC,SAAS,WAAW,IAAI;IAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS;CAAE,CAAA;AAE/E;;GAEG;AACH,oBAAY,UAAU,CACpB,CAAC,SAAS,MAAM,GAAG,SAAS,EAC5B,CAAC,SAAS,CAAC,GAAG,CAAC,IACb,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE9E;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,CAAC,oBAE5D"}

14
node_modules/telegraf/typings/format.d.ts generated vendored Normal file
View file

@ -0,0 +1,14 @@
import { User } from 'typegram';
import { FmtString } from './core/helpers/formatting';
export { FmtString };
export declare const fmt: (parts: string | string[] | TemplateStringsArray, ...items: (string | FmtString)[]) => FmtString;
export declare const bold: (parts: string | string[] | TemplateStringsArray, ...items: (string | FmtString)[]) => FmtString;
export declare const italic: (parts: string | string[] | TemplateStringsArray, ...items: (string | FmtString)[]) => FmtString;
export declare const spoiler: (parts: string | string[] | TemplateStringsArray, ...items: (string | FmtString)[]) => FmtString;
export declare const strikethrough: (parts: string | string[] | TemplateStringsArray, ...items: (string | FmtString)[]) => FmtString;
export declare const underline: (parts: string | string[] | TemplateStringsArray, ...items: (string | FmtString)[]) => FmtString;
export declare const code: (parts: string | string[] | TemplateStringsArray, ...items: string[]) => FmtString;
export declare const pre: (language: string) => (parts: string | string[] | TemplateStringsArray, ...items: string[]) => FmtString;
export declare const link: (content: string | FmtString, url: string) => FmtString;
export declare const mention: (name: string | FmtString, user: number | User) => FmtString;
//# sourceMappingURL=format.d.ts.map

1
node_modules/telegraf/typings/format.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAuB,MAAM,2BAA2B,CAAA;AAE1E,OAAO,EAAE,SAAS,EAAE,CAAA;AAEpB,eAAO,MAAM,GAAG,kGAAqB,CAAA;AACrC,eAAO,MAAM,IAAI,kGAAe,CAAA;AAChC,eAAO,MAAM,MAAM,kGAAiB,CAAA;AACpC,eAAO,MAAM,OAAO,kGAAkB,CAAA;AACtC,eAAO,MAAM,aAAa,kGAAwB,CAAA;AAClD,eAAO,MAAM,SAAS,kGAAoB,CAAA;AAC1C,eAAO,MAAM,IAAI,oFAAe,CAAA;AAChC,eAAO,MAAM,GAAG,aAAc,MAAM,uFAA8B,CAAA;AAElE,eAAO,MAAM,IAAI,YAAa,MAAM,GAAG,SAAS,OAAO,MAAM,cACT,CAAA;AAEpD,eAAO,MAAM,OAAO,SAAU,MAAM,GAAG,SAAS,QAAQ,MAAM,GAAG,IAAI,cAGZ,CAAA"}

12
node_modules/telegraf/typings/future.d.ts generated vendored Normal file
View file

@ -0,0 +1,12 @@
import Context from './context';
import { Middleware } from './middleware';
/**
* Sets up Context to use the new reply methods.
* This middleware makes `ctx.reply()` and `ctx.replyWith*()` methods will actually reply to the message they are replying to.
* Use `ctx.sendMessage()` to send a message in chat without replying to it.
*
* If the message to reply is deleted, `reply()` will send a normal message.
* If the update is not a message and we are unable to reply, `reply()` will send a normal message.
*/
export declare function useNewReplies<C extends Context>(): Middleware<C>;
//# sourceMappingURL=future.d.ts.map

1
node_modules/telegraf/typings/future.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"future.d.ts","sourceRoot":"","sources":["../src/future.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA2KzC;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CA0BhE"}

15
node_modules/telegraf/typings/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,15 @@
export { Telegraf } from './telegraf';
export { Context } from './context';
export { Composer, NarrowedContext } from './composer';
export { Middleware, MiddlewareFn, MiddlewareObj } from './middleware';
export { Router } from './router';
export { TelegramError } from './core/network/error';
export { Telegram } from './telegram';
export * as Types from './telegram-types';
export * as Markup from './markup';
export * as Input from './input';
export * as Format from './format';
export { deunionize } from './deunionize';
export { session, MemorySessionStore } from './session';
export * as Scenes from './scenes';
//# sourceMappingURL=index.d.ts.map

1
node_modules/telegraf/typings/index.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAEzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEvD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA"}

55
node_modules/telegraf/typings/input.d.ts generated vendored Normal file
View file

@ -0,0 +1,55 @@
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { InputFile } from './core/types/typegram';
/**
* The local file specified by path will be uploaded to Telegram using multipart/form-data.
*
* 10 MB max size for photos, 50 MB for other files.
*/
export declare const fromLocalFile: (path: string, filename?: string) => InputFile;
/**
* The buffer will be uploaded as file to Telegram using multipart/form-data.
*
* 10 MB max size for photos, 50 MB for other files.
*/
export declare const fromBuffer: (buffer: Buffer, filename?: string) => InputFile;
/**
* Contents of the stream will be uploaded as file to Telegram using multipart/form-data.
*
* 10 MB max size for photos, 50 MB for other files.
*/
export declare const fromReadableStream: (stream: NodeJS.ReadableStream, filename?: string) => InputFile;
/**
* Contents of the URL will be streamed to Telegram.
*
* 10 MB max size for photos, 50 MB for other files.
*/
export declare const fromURLStream: (url: string | URL, filename?: string) => InputFile;
/**
* Provide Telegram with an HTTP URL for the file to be sent.
* Telegram will download and send the file.
*
* * The target file must have the correct MIME type (e.g., audio/mpeg for `sendAudio`, etc.).
* * `sendDocument` with URL will currently only work for GIF, PDF and ZIP files.
* * To use `sendVoice`, the file must have the type audio/ogg and be no more than 1MB in size.
* 1-20MB voice notes will be sent as files.
*
* 5 MB max size for photos and 20 MB max for other types of content.
*/
export declare const fromURL: (url: string | URL) => string;
/**
* If the file is already stored somewhere on the Telegram servers, you don't need to reupload it:
* each file object has a file_id field, simply pass this file_id as a parameter instead of uploading.
*
* It is not possible to change the file type when resending by file_id.
*
* It is not possible to resend thumbnails using file_id.
* They have to be uploaded using one of the other Input methods.
*
* There are no limits for files sent this way.
*/
export declare const fromFileId: (fileId: string) => string;
//# sourceMappingURL=input.d.ts.map

1
node_modules/telegraf/typings/input.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD;;;;GAIG;AAEH,eAAO,MAAM,aAAa,SAAU,MAAM,aAAa,MAAM,KAAG,SAAyC,CAAA;AAEzG;;;;GAIG;AAEH,eAAO,MAAM,UAAU,WAAY,MAAM,aAAa,MAAM,KAAG,SAA2C,CAAA;AAE1G;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,WAAY,qBAAqB,aAAa,MAAM,KAAG,SAA2C,CAAA;AAEjI;;;;GAIG;AAEH,eAAO,MAAM,aAAa,QAAS,MAAM,GAAG,GAAG,aAAa,MAAM,KAAG,SAAgD,CAAA;AAErH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,QAAS,MAAM,GAAG,GAAG,KAAG,MAAwB,CAAA;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,WAAY,MAAM,KAAG,MAAgB,CAAA"}

26
node_modules/telegraf/typings/markup.d.ts generated vendored Normal file
View file

@ -0,0 +1,26 @@
import { ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove } from './core/types/typegram';
declare type Hideable<B> = B & {
hide?: boolean;
};
declare type HideableKBtn = Hideable<KeyboardButton>;
declare type HideableIKBtn = Hideable<InlineKeyboardButton>;
export declare class Markup<T extends InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply> {
readonly reply_markup: T;
constructor(reply_markup: T);
selective<T extends ForceReply | ReplyKeyboardMarkup>(this: Markup<T>, value?: boolean): Markup<T>;
placeholder<T extends ForceReply | ReplyKeyboardMarkup>(this: Markup<T>, placeholder: string): Markup<T>;
resize(this: Markup<ReplyKeyboardMarkup>, value?: boolean): Markup<ReplyKeyboardMarkup>;
oneTime(this: Markup<ReplyKeyboardMarkup>, value?: boolean): Markup<ReplyKeyboardMarkup>;
}
export * as button from './button';
export declare function removeKeyboard(): Markup<ReplyKeyboardRemove>;
export declare function forceReply(): Markup<ForceReply>;
export declare function keyboard(buttons: HideableKBtn[][]): Markup<ReplyKeyboardMarkup>;
export declare function keyboard(buttons: HideableKBtn[], options?: Partial<KeyboardBuildingOptions<HideableKBtn>>): Markup<ReplyKeyboardMarkup>;
export declare function inlineKeyboard(buttons: HideableIKBtn[][]): Markup<InlineKeyboardMarkup>;
export declare function inlineKeyboard(buttons: HideableIKBtn[], options?: Partial<KeyboardBuildingOptions<HideableIKBtn>>): Markup<InlineKeyboardMarkup>;
interface KeyboardBuildingOptions<B extends HideableKBtn | HideableIKBtn> {
wrap?: (btn: B, index: number, currentRow: B[]) => boolean;
columns: number;
}
//# sourceMappingURL=markup.d.ts.map

1
node_modules/telegraf/typings/markup.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"markup.d.ts","sourceRoot":"","sources":["../src/markup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAG9B,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AACzC,aAAK,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;AAC5C,aAAK,aAAa,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAA;AAEnD,qBAAa,MAAM,CACjB,CAAC,SACG,oBAAoB,GACpB,mBAAmB,GACnB,mBAAmB,GACnB,UAAU;IAEF,QAAQ,CAAC,YAAY,EAAE,CAAC;gBAAf,YAAY,EAAE,CAAC;IAEpC,SAAS,CAAC,CAAC,SAAS,UAAU,GAAG,mBAAmB,EAClD,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EACf,KAAK,UAAO;IAKd,WAAW,CAAC,CAAC,SAAS,UAAU,GAAG,mBAAmB,EACpD,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EACf,WAAW,EAAE,MAAM;IAQrB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAAE,KAAK,UAAO;IAOtD,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAAE,KAAK,UAAO;CAMxD;AAED,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,wBAAgB,cAAc,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAE5D;AAED,wBAAgB,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,CAE/C;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAA;AAChF,wBAAgB,QAAQ,CACtB,OAAO,EAAE,YAAY,EAAE,EACvB,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,GACvD,MAAM,CAAC,mBAAmB,CAAC,CAAA;AAY9B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,aAAa,EAAE,EAAE,GACzB,MAAM,CAAC,oBAAoB,CAAC,CAAA;AAC/B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,aAAa,EAAE,EACxB,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,GACxD,MAAM,CAAC,oBAAoB,CAAC,CAAA;AAY/B,UAAU,uBAAuB,CAAC,CAAC,SAAS,YAAY,GAAG,aAAa;IACtE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,OAAO,CAAA;IAC1D,OAAO,EAAE,MAAM,CAAA;CAChB"}

7
node_modules/telegraf/typings/middleware.d.ts generated vendored Normal file
View file

@ -0,0 +1,7 @@
import { Context } from './context';
export declare type MiddlewareFn<C extends Context> = (ctx: C, next: () => Promise<void>) => Promise<unknown> | void;
export interface MiddlewareObj<C extends Context> {
middleware: () => MiddlewareFn<C>;
}
export declare type Middleware<C extends Context> = MiddlewareFn<C> | MiddlewareObj<C>;
//# sourceMappingURL=middleware.d.ts.map

1
node_modules/telegraf/typings/middleware.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,oBAAY,YAAY,CAAC,CAAC,SAAS,OAAO,IAAI,CAC5C,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KACtB,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;AAE5B,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO;IAC9C,UAAU,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,CAAA;CAClC;AAED,oBAAY,UAAU,CAAC,CAAC,SAAS,OAAO,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA"}

21
node_modules/telegraf/typings/router.d.ts generated vendored Normal file
View file

@ -0,0 +1,21 @@
/** @format */
import { Middleware, MiddlewareObj } from './middleware';
import Context from './context';
declare type NonemptyReadonlyArray<T> = readonly [T, ...T[]];
declare type RouteFn<TContext extends Context> = (ctx: TContext) => {
route: string;
context?: Partial<TContext>;
state?: Partial<TContext['state']>;
} | null;
/** @deprecated in favor of {@link Composer.dispatch} */
export declare class Router<C extends Context> implements MiddlewareObj<C> {
private readonly routeFn;
handlers: Map<string, Middleware<C>>;
private otherwiseHandler;
constructor(routeFn: RouteFn<C>, handlers?: Map<string, Middleware<C>>);
on(route: string, ...fns: NonemptyReadonlyArray<Middleware<C>>): this;
otherwise(...fns: NonemptyReadonlyArray<Middleware<C>>): this;
middleware(): import("./middleware").MiddlewareFn<C>;
}
export {};
//# sourceMappingURL=router.d.ts.map

1
node_modules/telegraf/typings/router.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,OAAO,MAAM,WAAW,CAAA;AAE/B,aAAK,qBAAqB,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;AAEpD,aAAK,OAAO,CAAC,QAAQ,SAAS,OAAO,IAAI,CAAC,GAAG,EAAE,QAAQ,KAAK;IAC1D,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA;CACnC,GAAG,IAAI,CAAA;AAER,wDAAwD;AACxD,qBAAa,MAAM,CAAC,CAAC,SAAS,OAAO,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IAI9D,OAAO,CAAC,QAAQ,CAAC,OAAO;IACjB,QAAQ;IAJjB,OAAO,CAAC,gBAAgB,CAAqC;gBAG1C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAC7B,QAAQ,6BAAmC;IAOpD,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAQ9D,SAAS,CAAC,GAAG,GAAG,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAQtD,UAAU;CAWX"}

22
node_modules/telegraf/typings/scenes/base.d.ts generated vendored Normal file
View file

@ -0,0 +1,22 @@
import { Middleware, MiddlewareFn } from '../middleware';
import Composer from '../composer';
import Context from '../context';
export interface SceneOptions<C extends Context> {
ttl?: number;
handlers: ReadonlyArray<MiddlewareFn<C>>;
enterHandlers: ReadonlyArray<MiddlewareFn<C>>;
leaveHandlers: ReadonlyArray<MiddlewareFn<C>>;
}
export declare class BaseScene<C extends Context = Context> extends Composer<C> {
id: string;
ttl?: number;
enterHandler: MiddlewareFn<C>;
leaveHandler: MiddlewareFn<C>;
constructor(id: string, options?: SceneOptions<C>);
enter(...fns: Array<Middleware<C>>): this;
leave(...fns: Array<Middleware<C>>): this;
enterMiddleware(): MiddlewareFn<C>;
leaveMiddleware(): MiddlewareFn<C>;
}
export default BaseScene;
//# sourceMappingURL=base.d.ts.map

1
node_modules/telegraf/typings/scenes/base.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/scenes/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,OAAO,MAAM,YAAY,CAAA;AAIhC,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,OAAO;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,aAAa,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,aAAa,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAC9C;AAED,qBAAa,SAAS,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACrE,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC7B,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;gBACjB,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAcjD,KAAK,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAKlC,KAAK,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAKlC,eAAe;IAIf,eAAe;CAGhB;AAED,eAAe,SAAS,CAAA"}

36
node_modules/telegraf/typings/scenes/context.d.ts generated vendored Normal file
View file

@ -0,0 +1,36 @@
import BaseScene from './base';
import Context from '../context';
import { SessionContext } from '../session';
export interface SceneContext<D extends SceneSessionData = SceneSessionData> extends Context {
session: SceneSession<D>;
scene: SceneContextScene<SceneContext<D>, D>;
}
export interface SceneSessionData {
current?: string;
expires?: number;
state?: object;
}
export interface SceneSession<S extends SceneSessionData = SceneSessionData> {
__scenes: S;
}
export interface SceneContextSceneOptions<D extends SceneSessionData> {
ttl?: number;
default?: string;
defaultSession: D;
}
export default class SceneContextScene<C extends SessionContext<SceneSession<D>>, D extends SceneSessionData = SceneSessionData> {
private readonly ctx;
private readonly scenes;
private readonly options;
constructor(ctx: C, scenes: Map<string, BaseScene<C>>, options: Partial<SceneContextSceneOptions<D>>);
get session(): D;
get state(): object;
set state(value: object);
get current(): BaseScene<C> | undefined;
reset(): void;
enter(sceneId: string, initialState?: object, silent?: boolean): Promise<unknown>;
reenter(): Promise<unknown> | undefined;
private leaving;
leave(): Promise<void>;
}
//# sourceMappingURL=context.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/scenes/context.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,QAAQ,CAAA;AAE9B,OAAO,OAAO,MAAM,YAAY,CAAA;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAM3C,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,CACzE,SAAQ,OAAO;IACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IACxB,KAAK,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IACzE,QAAQ,EAAE,CAAC,CAAA;CACZ;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,gBAAgB;IAClE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,CAAC,CAAA;CAClB;AAED,MAAM,CAAC,OAAO,OAAO,iBAAiB,CACpC,CAAC,SAAS,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACzC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IAK3C,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;gBAGlC,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAClD,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAQ/C,IAAI,OAAO,IAAI,CAAC,CAaf;IAED,IAAI,KAAK,WAER;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,OAAO,6BAKV;IAED,KAAK;IAKC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,GAAE,MAAW,EAAE,MAAM,UAAQ;IAyBtE,OAAO;IAMP,OAAO,CAAC,OAAO,CAAQ;IACjB,KAAK;CAmBZ"}

11
node_modules/telegraf/typings/scenes/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
/**
* @see https://github.com/telegraf/telegraf/issues/705#issuecomment-549056045
* @see https://www.npmjs.com/package/telegraf-stateless-question
* @packageDocumentation
*/
export { Stage } from './stage';
export { SceneContext, SceneSession, default as SceneContextScene, SceneSessionData, } from './context';
export { BaseScene } from './base';
export { WizardScene } from './wizard';
export { WizardContext, WizardSession, default as WizardContextWizard, WizardSessionData, } from './wizard/context';
//# sourceMappingURL=index.d.ts.map

1
node_modules/telegraf/typings/scenes/index.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scenes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,OAAO,IAAI,iBAAiB,EAC5B,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtC,OAAO,EACL,aAAa,EACb,aAAa,EACb,OAAO,IAAI,mBAAmB,EAC9B,iBAAiB,GAClB,MAAM,kBAAkB,CAAA"}

24
node_modules/telegraf/typings/scenes/stage.d.ts generated vendored Normal file
View file

@ -0,0 +1,24 @@
import { SessionContext } from '../session';
import SceneContextScene, { SceneContextSceneOptions, SceneSession, SceneSessionData } from './context';
import { BaseScene } from './base';
import { Composer } from '../composer';
import { Context } from '../context';
export declare class Stage<C extends SessionContext<SceneSession<D>> & {
scene: SceneContextScene<C, D>;
}, D extends SceneSessionData = SceneSessionData> extends Composer<C> {
options: Partial<SceneContextSceneOptions<D>>;
scenes: Map<string, BaseScene<C>>;
constructor(scenes?: ReadonlyArray<BaseScene<C>>, options?: Partial<SceneContextSceneOptions<D>>);
register(...scenes: ReadonlyArray<BaseScene<C>>): this;
middleware(): import("../middleware").MiddlewareFn<C>;
static enter<C extends Context & {
scene: SceneContextScene<C>;
}>(...args: Parameters<SceneContextScene<C>['enter']>): (ctx: C) => Promise<unknown>;
static reenter<C extends Context & {
scene: SceneContextScene<C>;
}>(...args: Parameters<SceneContextScene<C>['reenter']>): (ctx: C) => Promise<unknown> | undefined;
static leave<C extends Context & {
scene: SceneContextScene<C>;
}>(...args: Parameters<SceneContextScene<C>['leave']>): (ctx: C) => Promise<void>;
}
//# sourceMappingURL=stage.d.ts.map

1
node_modules/telegraf/typings/scenes/stage.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/scenes/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,cAAc,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,iBAAiB,EAAE,EACxB,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,qBAAa,KAAK,CAChB,CAAC,SAAS,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG;IAC1C,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC/B,EACD,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,CAC7C,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;gBAG/B,MAAM,GAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAM,EACxC,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAQhD,QAAQ,CAAC,GAAG,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAU/C,UAAU;IAcV,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;KAAE,EAC9D,GAAG,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAErC,CAAC;IAGhB,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,OAAO,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;KAAE,EAChE,GAAG,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAEvC,CAAC;IAGhB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;KAAE,EAC9D,GAAG,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAErC,CAAC;CAEjB"}

View file

@ -0,0 +1,29 @@
import SceneContextScene, { SceneSession, SceneSessionData } from '../context';
import Context from '../../context';
import { Middleware } from '../../middleware';
import { SessionContext } from '../../session';
export interface WizardContext<D extends WizardSessionData = WizardSessionData> extends Context {
session: WizardSession<D>;
scene: SceneContextScene<WizardContext<D>, D>;
wizard: WizardContextWizard<WizardContext<D>>;
}
export interface WizardSessionData extends SceneSessionData {
cursor: number;
}
export interface WizardSession<S extends WizardSessionData = WizardSessionData> extends SceneSession<S> {
}
export default class WizardContextWizard<C extends SessionContext<WizardSession> & {
scene: SceneContextScene<C, WizardSessionData>;
}> {
private readonly ctx;
private readonly steps;
readonly state: object;
constructor(ctx: C, steps: ReadonlyArray<Middleware<C>>);
get step(): Middleware<C> | undefined;
get cursor(): number;
set cursor(cursor: number);
selectStep(index: number): this;
next(): this;
back(): this;
}
//# sourceMappingURL=context.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/scenes/wizard/context.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,EAAE,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,OAAO,MAAM,eAAe,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAC5E,SAAQ,OAAO;IACf,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACzB,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC7C,MAAM,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;CAC9C;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAC5E,SAAQ,YAAY,CAAC,CAAC,CAAC;CAAG;AAE5B,MAAM,CAAC,OAAO,OAAO,mBAAmB,CACtC,CAAC,SAAS,cAAc,CAAC,aAAa,CAAC,GAAG;IACxC,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAA;CAC/C;IAIC,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;gBAEH,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAMtD,IAAI,IAAI,8BAEP;IAED,IAAI,MAAM,IAIS,MAAM,CAFxB;IAED,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAExB;IAED,UAAU,CAAC,KAAK,EAAE,MAAM;IAKxB,IAAI;IAIJ,IAAI;CAGL"}

16
node_modules/telegraf/typings/scenes/wizard/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,16 @@
import BaseScene, { SceneOptions } from '../base';
import { Middleware, MiddlewareObj } from '../../middleware';
import WizardContextWizard, { WizardSessionData } from './context';
import Context from '../../context';
import SceneContextScene from '../context';
export declare class WizardScene<C extends Context & {
scene: SceneContextScene<C, WizardSessionData>;
wizard: WizardContextWizard<C>;
}> extends BaseScene<C> implements MiddlewareObj<C> {
steps: Array<Middleware<C>>;
constructor(id: string, ...steps: Array<Middleware<C>>);
constructor(id: string, options: SceneOptions<C>, ...steps: Array<Middleware<C>>);
middleware(): import("../../middleware").MiddlewareFn<C>;
enterMiddleware(): import("../../middleware").MiddlewareFn<C>;
}
//# sourceMappingURL=index.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scenes/wizard/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,mBAAmB,EAAE,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAElE,OAAO,OAAO,MAAM,eAAe,CAAA;AACnC,OAAO,iBAAiB,MAAM,YAAY,CAAA;AAE1C,qBAAa,WAAW,CACpB,CAAC,SAAS,OAAO,GAAG;IAClB,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAA;IAC9C,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAA;CAC/B,CAEH,SAAQ,SAAS,CAAC,CAAC,CACnB,YAAW,aAAa,CAAC,CAAC,CAAC;IAE3B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;gBAEf,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAEpD,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EACxB,GAAG,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAoBhC,UAAU;IAiBV,eAAe;CAGhB"}

43
node_modules/telegraf/typings/session.d.ts generated vendored Normal file
View file

@ -0,0 +1,43 @@
import { Context } from './context';
import { MaybePromise } from './composer';
import { MiddlewareFn } from './middleware';
export interface SessionStore<T> {
get: (name: string) => MaybePromise<T | undefined>;
set: (name: string, value: T) => MaybePromise<void>;
delete: (name: string) => MaybePromise<void>;
}
interface SessionOptions<S extends object> {
getSessionKey?: (ctx: Context) => Promise<string | undefined>;
store?: SessionStore<S>;
}
export interface SessionContext<S extends object> extends Context {
session?: S;
}
/**
* Returns middleware that adds `ctx.session` for storing arbitrary state per session key.
*
* The default `getSessionKey` is <code>\`${ctx.from.id}:${ctx.chat.id}\`</code>.
* If either `ctx.from` or `ctx.chat` is `undefined`, default session key and thus `ctx.session` are also `undefined`.
*
* Session data is kept only in memory by default,
* which means that all data will be lost when the process is terminated.
* If you want to store data across restarts, or share it among workers,
* you can [install persistent session middleware from npm](https://www.npmjs.com/search?q=telegraf-session),
* or pass custom `storage`.
*
* @example https://github.com/telegraf/telegraf/blob/develop/docs/examples/session-bot.ts
* @deprecated https://github.com/telegraf/telegraf/issues/1372#issuecomment-782668499
*/
export declare function session<S extends object>(options?: SessionOptions<S>): MiddlewareFn<SessionContext<S>>;
/** @deprecated https://github.com/telegraf/telegraf/issues/1372#issuecomment-782668499 */
export declare class MemorySessionStore<T> implements SessionStore<T> {
private readonly ttl;
private readonly store;
constructor(ttl?: number);
get(name: string): T | undefined;
set(name: string, value: T): void;
delete(name: string): void;
}
export declare function isSessionContext<S extends object>(ctx: Context): ctx is SessionContext<S>;
export {};
//# sourceMappingURL=session.d.ts.map

1
node_modules/telegraf/typings/session.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;IAClD,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC,CAAA;IACnD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,CAAC,IAAI,CAAC,CAAA;CAC7C;AAED,UAAU,cAAc,CAAC,CAAC,SAAS,MAAM;IACvC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7D,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CACxB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,OAAO;IAC/D,OAAO,CAAC,EAAE,CAAC,CAAA;CACZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EACtC,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAC1B,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAgBjC;AAWD,0FAA0F;AAC1F,qBAAa,kBAAkB,CAAC,CAAC,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IAG/C,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqD;gBAE9C,GAAG,SAAW;IAE3C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAWhC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAKjC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAG3B;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAC/C,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAE1B"}

111
node_modules/telegraf/typings/telegraf.d.ts generated vendored Normal file
View file

@ -0,0 +1,111 @@
/// <reference types="node" />
/// <reference types="node" />
import * as http from 'http';
import * as tg from './core/types/typegram';
import * as tt from './telegram-types';
import { Composer, MaybePromise } from './composer';
import ApiClient from './core/network/client';
import Context from './context';
import Telegram from './telegram';
import { TlsOptions } from 'tls';
export declare namespace Telegraf {
interface Options<TContext extends Context> {
contextType: new (...args: ConstructorParameters<typeof Context>) => TContext;
handlerTimeout: number;
telegram?: Partial<ApiClient.Options>;
}
interface LaunchOptions {
dropPendingUpdates?: boolean;
/** List the types of updates you want your bot to receive */
allowedUpdates?: tt.UpdateType[];
/** Configuration options for when the bot is run via webhooks */
webhook?: {
/** Public domain for webhook. */
domain: string;
/** Webhook url path; will be automatically generated if not specified */
hookPath?: string;
host?: string;
port?: number;
/** The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS */
ipAddress?: string;
/**
* Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40.
* Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.
*/
maxConnections?: number;
/** TLS server options. Omit to use http. */
tlsOptions?: TlsOptions;
/**
* A secret token to be sent in a header `“X-Telegram-Bot-Api-Secret-Token”` in every webhook request.
* 1-256 characters. Only characters `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed.
* The header is useful to ensure that the request comes from a webhook set by you.
*/
secretToken?: string;
/**
* Upload your public key certificate so that the root certificate in use can be checked.
* See [self-signed guide](https://core.telegram.org/bots/self-signed) for details.
*/
certificate?: tg.InputFile;
cb?: http.RequestListener;
};
}
}
export declare class Telegraf<C extends Context = Context> extends Composer<C> {
private readonly options;
private webhookServer?;
private polling?;
/** Set manually to avoid implicit `getMe` call in `launch` or `webhookCallback` */
botInfo?: tg.UserFromGetMe;
telegram: Telegram;
readonly context: Partial<C>;
/** Assign to this to customise the webhook filter middleware.
* `{ hookPath, secretToken }` will be bound to this rather than the Telegraf instance.
* Remember to assign a regular function and not an arrow function so it's bindable.
*/
webhookFilter: (this: {
hookPath: string;
secretToken?: string;
}, req: http.IncomingMessage) => boolean;
private handleError;
constructor(token: string, options?: Partial<Telegraf.Options<C>>);
private get token();
/** @deprecated use `ctx.telegram.webhookReply` */
set webhookReply(webhookReply: boolean);
/** @deprecated use `ctx.telegram.webhookReply` */
get webhookReply(): boolean;
/**
* _Override_ error handling
*/
catch(handler: (err: unknown, ctx: C) => MaybePromise<void>): this;
/**
* You must call `bot.telegram.setWebhook` for this to work.
* You should probably use {@link Telegraf.createWebhook} instead.
*/
webhookCallback(hookPath?: string, opts?: {
secretToken?: string;
}): (req: http.IncomingMessage & {
body?: tg.Update | undefined;
}, res: http.ServerResponse, next?: () => void) => Promise<void>;
private getDomainOpts;
/**
* Specify a url to receive incoming updates via webhook.
* Returns an Express-style middleware you can pass to app.use()
*/
createWebhook(opts: {
domain: string;
path?: string;
} & tt.ExtraSetWebhook): Promise<(req: http.IncomingMessage & {
body?: tg.Update | undefined;
}, res: http.ServerResponse, next?: () => void) => Promise<void>>;
private startPolling;
private startWebhook;
secretPathComponent(): string;
/**
* @see https://github.com/telegraf/telegraf/discussions/1344#discussioncomment-335700
*/
launch(config?: Telegraf.LaunchOptions): Promise<void>;
stop(reason?: string): void;
private botInfoCall?;
handleUpdate(update: tg.Update, webhookResponse?: http.ServerResponse): Promise<void>;
}
//# sourceMappingURL=telegraf.d.ts.map

1
node_modules/telegraf/typings/telegraf.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"telegraf.d.ts","sourceRoot":"","sources":["../src/telegraf.ts"],"names":[],"mappings":"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"}

73
node_modules/telegraf/typings/telegram-types.d.ts generated vendored Normal file
View file

@ -0,0 +1,73 @@
/** @format */
import { Expand } from './util';
import { Message, Opts, Telegram, Update } from './core/types/typegram';
import { UnionKeys } from './deunionize';
import { FmtString } from './format';
export { Markup } from './markup';
export declare type ChatAction = Opts<'sendChatAction'>['action'];
declare type WrapCaption<T> = T extends {
caption?: string;
} ? Expand<Omit<T, 'caption'> & {
caption?: string | FmtString;
}> : T;
/**
* Create an `Extra*` type from the arguments of a given method `M extends keyof Telegram` but `Omit`ting fields with key `K` from it.
*
* Note that `chat_id` may not be specified in `K` because it is `Omit`ted by default.
*/
declare type MakeExtra<M extends keyof Telegram, K extends keyof Omit<Opts<M>, 'chat_id'> = never> = WrapCaption<Omit<Opts<M>, 'chat_id' | K>>;
export declare type ExtraAddStickerToSet = MakeExtra<'addStickerToSet', 'name' | 'user_id'>;
export declare type ExtraAnimation = MakeExtra<'sendAnimation', 'animation'>;
export declare type ExtraAnswerCbQuery = MakeExtra<'answerCallbackQuery', 'text' | 'callback_query_id'>;
export declare type ExtraAnswerInlineQuery = MakeExtra<'answerInlineQuery', 'inline_query_id' | 'results'>;
export declare type ExtraAudio = MakeExtra<'sendAudio', 'audio'>;
export declare type ExtraContact = MakeExtra<'sendContact', 'phone_number' | 'first_name'>;
export declare type ExtraCopyMessage = MakeExtra<'copyMessage', 'from_chat_id' | 'message_id'>;
export declare type ExtraCreateChatInviteLink = MakeExtra<'createChatInviteLink'>;
export declare type NewInvoiceLinkParameters = MakeExtra<'createInvoiceLink'>;
export declare type ExtraCreateNewStickerSet = MakeExtra<'createNewStickerSet', 'name' | 'title' | 'user_id'>;
export declare type ExtraDice = MakeExtra<'sendDice'>;
export declare type ExtraDocument = MakeExtra<'sendDocument', 'document'>;
export declare type ExtraEditChatInviteLink = MakeExtra<'editChatInviteLink', 'invite_link'>;
export declare type ExtraEditMessageCaption = MakeExtra<'editMessageCaption', 'message_id' | 'inline_message_id' | 'caption'>;
export declare type ExtraEditMessageLiveLocation = MakeExtra<'editMessageLiveLocation', 'message_id' | 'inline_message_id' | 'latitude' | 'longitude'>;
export declare type ExtraEditMessageMedia = MakeExtra<'editMessageMedia', 'message_id' | 'inline_message_id' | 'media'>;
export declare type ExtraEditMessageText = MakeExtra<'editMessageText', 'message_id' | 'inline_message_id' | 'text'>;
export declare type ExtraGame = MakeExtra<'sendGame', 'game_short_name'>;
export declare type NewInvoiceParameters = MakeExtra<'sendInvoice', 'disable_notification' | 'reply_to_message_id' | 'allow_sending_without_reply' | 'reply_markup'>;
export declare type ExtraInvoice = MakeExtra<'sendInvoice', keyof NewInvoiceParameters>;
export declare type ExtraBanChatMember = MakeExtra<'banChatMember', 'user_id' | 'until_date'>;
export declare type ExtraKickChatMember = ExtraBanChatMember;
export declare type ExtraLocation = MakeExtra<'sendLocation', 'latitude' | 'longitude'>;
export declare type ExtraMediaGroup = MakeExtra<'sendMediaGroup', 'media'>;
export declare type ExtraPhoto = MakeExtra<'sendPhoto', 'photo'>;
export declare type ExtraPoll = MakeExtra<'sendPoll', 'question' | 'options' | 'type'>;
export declare type ExtraPromoteChatMember = MakeExtra<'promoteChatMember', 'user_id'>;
export declare type ExtraReplyMessage = MakeExtra<'sendMessage', 'text'>;
export declare type ExtraRestrictChatMember = MakeExtra<'restrictChatMember', 'user_id'>;
export declare type ExtraSetMyCommands = MakeExtra<'setMyCommands', 'commands'>;
export declare type ExtraSetWebhook = MakeExtra<'setWebhook', 'url'>;
export declare type ExtraSticker = MakeExtra<'sendSticker', 'sticker'>;
export declare type ExtraStopPoll = MakeExtra<'stopPoll', 'message_id'>;
export declare type ExtraVenue = MakeExtra<'sendVenue', 'latitude' | 'longitude' | 'title' | 'address'>;
export declare type ExtraVideo = MakeExtra<'sendVideo', 'video'>;
export declare type ExtraVideoNote = MakeExtra<'sendVideoNote', 'video_note'>;
export declare type ExtraVoice = MakeExtra<'sendVoice', 'voice'>;
export declare type ExtraBanChatSenderChat = MakeExtra<'banChatSenderChat', 'sender_chat_id'>;
/** Possible update types */
export declare type UpdateType = Exclude<UnionKeys<Update>, keyof Update>;
/** Possible message subtypes. Same as the properties on a message object */
export declare type MessageSubType = 'forward_date' | Exclude<UnionKeys<Message>, keyof Message.CaptionableMessage | 'entities' | 'media_group_id'>;
declare type ExtractPartial<T extends object, U extends object> = T extends unknown ? Required<T> extends U ? T : never : never;
/**
* Maps [[`Composer.on`]]'s `updateType` or `messageSubType` to a `tt.Update` subtype.
*/
export declare type MountMap = {
[T in UpdateType]: Extract<Update, Record<T, object>>;
} & {
[T in MessageSubType]: {
message: ExtractPartial<Update.MessageUpdate['message'], Record<T, unknown>>;
update_id: number;
};
};
//# sourceMappingURL=telegram-types.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"telegram-types.d.ts","sourceRoot":"","sources":["../src/telegram-types.ts"],"names":[],"mappings":"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"}

456
node_modules/telegraf/typings/telegram.d.ts generated vendored Normal file
View file

@ -0,0 +1,456 @@
/// <reference types="node" />
import * as tg from './core/types/typegram';
import * as tt from './telegram-types';
import ApiClient from './core/network/client';
import { URL } from 'url';
import { FmtString } from './format';
export declare class Telegram extends ApiClient {
/**
* Get basic information about the bot
*/
getMe(): Promise<tg.UserFromGetMe>;
/**
* Get basic info about a file and prepare it for downloading.
* @param fileId Id of file to get link to
*/
getFile(fileId: string): Promise<tg.File>;
/**
* Get download link to a file.
*/
getFileLink(fileId: string | tg.File): Promise<URL>;
/**
* Directly request incoming updates.
* You should probably use `Telegraf::launch` instead.
*/
getUpdates(timeout: number, limit: number, offset: number, allowedUpdates: readonly tt.UpdateType[] | undefined): Promise<tg.Update[]>;
getWebhookInfo(): Promise<tg.WebhookInfo>;
getGameHighScores(userId: number, inlineMessageId: string | undefined, chatId: number | undefined, messageId: number | undefined): Promise<tg.GameHighScore[]>;
setGameScore(userId: number, score: number, inlineMessageId: string | undefined, chatId: number | undefined, messageId: number | undefined, editMessage?: boolean, force?: boolean): Promise<true | (tg.Update.Edited & tg.Message.GameMessage)>;
/**
* Specify a url to receive incoming updates via an outgoing webhook.
* @param url HTTPS url to send updates to. Use an empty string to remove webhook integration
*/
setWebhook(url: string, extra?: tt.ExtraSetWebhook): Promise<true>;
/**
* Remove webhook integration.
*/
deleteWebhook(extra?: {
drop_pending_updates?: boolean;
}): Promise<true>;
/**
* Send a text message.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param text Text of the message to be sent
*/
sendMessage(chatId: number | string, text: string | FmtString, extra?: tt.ExtraReplyMessage): Promise<tg.Message.TextMessage>;
/**
* Forward existing message.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param fromChatId Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
* @param messageId Message identifier in the chat specified in from_chat_id
*/
forwardMessage(chatId: number | string, fromChatId: number | string, messageId: number, extra?: {
disable_notification?: boolean;
}): Promise<tg.Message>;
/**
* Use this method when you need to tell the user that something is happening on the bot's side.
* The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendChatAction(chatId: number | string, action: tt.ChatAction): Promise<true>;
getUserProfilePhotos(userId: number, offset?: number, limit?: number): Promise<tg.UserProfilePhotos>;
/**
* Send point on the map.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendLocation(chatId: number | string, latitude: number, longitude: number, extra?: tt.ExtraLocation): Promise<tg.Message.LocationMessage>;
sendVenue(chatId: number | string, latitude: number, longitude: number, title: string, address: string, extra?: tt.ExtraVenue): Promise<tg.Message.VenueMessage>;
/**
* @param chatId Unique identifier for the target private chat
*/
sendInvoice(chatId: number | string, invoice: tt.NewInvoiceParameters, extra?: tt.ExtraInvoice): Promise<tg.Message.InvoiceMessage>;
sendContact(chatId: number | string, phoneNumber: string, firstName: string, extra?: tt.ExtraContact): Promise<tg.Message.ContactMessage>;
/**
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendPhoto(chatId: number | string, photo: tg.Opts<'sendPhoto'>['photo'], extra?: tt.ExtraPhoto): Promise<tg.Message.PhotoMessage>;
/**
* Send a dice, which will have a random value from 1 to 6.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendDice(chatId: number | string, extra?: tt.ExtraDice): Promise<tg.Message.DiceMessage>;
/**
* Send general files. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendDocument(chatId: number | string, document: tg.Opts<'sendDocument'>['document'], extra?: tt.ExtraDocument): Promise<tg.Message.DocumentMessage>;
/**
* Send audio files, if you want Telegram clients to display them in the music player.
* Your audio must be in the .mp3 format.
* Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendAudio(chatId: number | string, audio: tg.Opts<'sendAudio'>['audio'], extra?: tt.ExtraAudio): Promise<tg.Message.AudioMessage>;
/**
* Send .webp, animated .tgs, or video .webm stickers
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendSticker(chatId: number | string, sticker: tg.Opts<'sendSticker'>['sticker'], extra?: tt.ExtraSticker): Promise<tg.Message.StickerMessage>;
/**
* Send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
* Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendVideo(chatId: number | string, video: tg.Opts<'sendVideo'>['video'], extra?: tt.ExtraVideo): Promise<tg.Message.VideoMessage>;
/**
* Send .gif animations.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendAnimation(chatId: number | string, animation: tg.Opts<'sendAnimation'>['animation'], extra?: tt.ExtraAnimation): Promise<tg.Message.AnimationMessage>;
/**
* Send video messages.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendVideoNote(chatId: number | string, videoNote: string | tg.InputFileVideoNote, extra?: tt.ExtraVideoNote): Promise<tg.Message.VideoNoteMessage>;
/**
* Send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
sendVoice(chatId: number | string, voice: tg.Opts<'sendVoice'>['voice'], extra?: tt.ExtraVoice): Promise<tg.Message.VoiceMessage>;
/**
* @param chatId Unique identifier for the target chat
* @param gameShortName Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.
*/
sendGame(chatId: number, gameName: string, extra?: tt.ExtraGame): Promise<tg.Message.GameMessage>;
/**
* Send a group of photos or videos as an album.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param media A JSON-serialized array describing photos and videos to be sent, must include 210 items
*/
sendMediaGroup(chatId: number | string, media: ReadonlyArray<tg.InputMediaPhoto | tg.InputMediaVideo> | readonly tg.InputMediaAudio[] | readonly tg.InputMediaDocument[], extra?: tt.ExtraMediaGroup): Promise<(tg.Message.DocumentMessage | tg.Message.AudioMessage | tg.Message.PhotoMessage | tg.Message.VideoMessage)[]>;
/**
* Send a native poll.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param question Poll question, 1-255 characters
* @param options A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
*/
sendPoll(chatId: number | string, question: string, options: readonly string[], extra?: tt.ExtraPoll): Promise<tg.Message.PollMessage>;
/**
* Send a native quiz.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param question Poll question, 1-255 characters
* @param options A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
*/
sendQuiz(chatId: number | string, question: string, options: readonly string[], extra: tt.ExtraPoll): Promise<tg.Message.PollMessage>;
/**
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param messageId Identifier of the original message with the poll
*/
stopPoll(chatId: number | string, messageId: number, extra?: tt.ExtraStopPoll): Promise<tg.Poll>;
/**
* Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.).
* @param chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
*/
getChat(chatId: number | string): Promise<tg.ChatFromGetChat>;
/**
* @param chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
*/
getChatAdministrators(chatId: number | string): Promise<(tg.ChatMemberOwner | tg.ChatMemberAdministrator)[]>;
/**
* Get information about a member of a chat.
* @param chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
* @param userId Unique identifier of the target user
*/
getChatMember(chatId: string | number, userId: number): Promise<tg.ChatMember>;
/**
* Get the number of members in a chat.
* @param chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
*/
getChatMembersCount(chatId: string | number): Promise<number>;
/**
* Send answers to an inline query.
* No more than 50 results per query are allowed.
*/
answerInlineQuery(inlineQueryId: string, results: readonly tg.InlineQueryResult[], extra?: tt.ExtraAnswerInlineQuery): Promise<true>;
setChatPermissions(chatId: number | string, permissions: tg.ChatPermissions): Promise<true>;
/**
* Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
* @param chatId Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`)
* @param untilDate Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
*/
banChatMember(chatId: number | string, userId: number, untilDate?: number, extra?: tt.ExtraBanChatMember): Promise<true>;
/**
* Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
* @param chatId Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`)
* @param untilDate Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
* @deprecated since API 5.3. Use {@link Telegram.banChatMember}
*/
get kickChatMember(): (chatId: string | number, userId: number, untilDate?: number | undefined, extra?: Omit<{
chat_id: string | number;
user_id: number;
until_date?: number | undefined;
revoke_messages?: boolean | undefined;
}, "chat_id" | "user_id" | "until_date"> | undefined) => Promise<true>;
/**
* Promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
*/
promoteChatMember(chatId: number | string, userId: number, extra: tt.ExtraPromoteChatMember): Promise<true>;
/**
* Restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user.
* @param chatId Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
*/
restrictChatMember(chatId: string | number, userId: number, extra: tt.ExtraRestrictChatMember): Promise<true>;
setChatAdministratorCustomTitle(chatId: number | string, userId: number, title: string): Promise<true>;
/**
* Export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
exportChatInviteLink(chatId: number | string): Promise<string>;
createChatInviteLink(chatId: number | string, extra?: tt.ExtraCreateChatInviteLink): Promise<tg.ChatInviteLink>;
createInvoiceLink(invoice: tt.NewInvoiceLinkParameters): Promise<string>;
editChatInviteLink(chatId: number | string, inviteLink: string, extra?: tt.ExtraEditChatInviteLink): Promise<tg.ChatInviteLink>;
revokeChatInviteLink(chatId: number | string, inviteLink: string): Promise<tg.ChatInviteLink>;
setChatPhoto(chatId: number | string, photo: tg.Opts<'setChatPhoto'>['photo']): Promise<true>;
deleteChatPhoto(chatId: number | string): Promise<true>;
/**
* Change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
* @param chatId Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`)
* @param title New chat title, 1-255 characters
*/
setChatTitle(chatId: number | string, title: string): Promise<true>;
setChatDescription(chatId: number | string, description?: string): Promise<true>;
/**
* Pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
* @param chatId Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
*/
pinChatMessage(chatId: number | string, messageId: number, extra?: {
disable_notification?: boolean;
}): Promise<true>;
/**
* Unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
unpinChatMessage(chatId: number | string, messageId?: number): Promise<true>;
/**
* Clear the list of pinned messages in a chat.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
unpinAllChatMessages(chatId: number | string): Promise<true>;
/**
* Use this method for your bot to leave a group, supergroup or channel.
* @param chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
*/
leaveChat(chatId: number | string): Promise<true>;
/**
* Unban a user from a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
* @param chatId Unique identifier for the target group or username of the target supergroup or channel (in the format @username)
* @param userId Unique identifier of the target user
*/
unbanChatMember(chatId: number | string, userId: number, extra?: {
only_if_banned?: boolean;
}): Promise<true>;
answerCbQuery(callbackQueryId: string, text?: string, extra?: tt.ExtraAnswerCbQuery): Promise<true>;
answerGameQuery(callbackQueryId: string, url: string): Promise<true>;
/**
* If you sent an invoice requesting a shipping address and the parameter is_flexible was specified,
* the Bot API will send an Update with a shipping_query field to the bot.
* Reply to shipping queries.
* @param ok Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
* @param shippingOptions Required if ok is True. A JSON-serialized array of available shipping options.
* @param errorMessage Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
*/
answerShippingQuery(shippingQueryId: string, ok: boolean, shippingOptions: readonly tg.ShippingOption[] | undefined, errorMessage: string | undefined): Promise<true>;
/**
* Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query.
* Respond to such pre-checkout queries. On success, True is returned.
* Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
* @param ok Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
* @param errorMessage Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.
*/
answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, errorMessage?: string): Promise<true>;
answerWebAppQuery(webAppQueryId: string, result: tg.InlineQueryResult): Promise<tg.SentWebAppMessage>;
/**
* Edit text and game messages sent by the bot or via the bot (for inline bots).
* On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
* @param chatId Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param messageId Required if inlineMessageId is not specified. Identifier of the sent message
* @param inlineMessageId Required if chatId and messageId are not specified. Identifier of the inline message
* @param text New text of the message
*/
editMessageText(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, text: string | FmtString, extra?: tt.ExtraEditMessageText): Promise<true | (tg.Update.Edited & tg.Message.TextMessage)>;
/**
* Edit captions of messages sent by the bot or via the bot (for inline bots).
* On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
* @param chatId Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param messageId Required if inlineMessageId is not specified. Identifier of the sent message
* @param inlineMessageId Required if chatId and messageId are not specified. Identifier of the inline message
* @param caption New caption of the message
* @param markup A JSON-serialized object for an inline keyboard.
*/
editMessageCaption(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, caption: string | FmtString | undefined, extra?: tt.ExtraEditMessageCaption): Promise<true | (tg.Update.Edited & tg.Message.CaptionableMessage)>;
/**
* Edit animation, audio, document, photo, or video messages.
* If a message is a part of a message album, then it can be edited only to a photo or a video.
* Otherwise, message type can be changed arbitrarily.
* When inline message is edited, new file can't be uploaded.
* Use previously uploaded file via its file_id or specify a URL.
* @param chatId Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param messageId Required if inlineMessageId is not specified. Identifier of the sent message
* @param inlineMessageId Required if chatId and messageId are not specified. Identifier of the inline message
* @param media New media of message
* @param markup Markup of inline keyboard
*/
editMessageMedia(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, media: tg.InputMedia, extra?: tt.ExtraEditMessageMedia): Promise<true | (tg.Update.Edited & tg.Message.AnimationMessage) | (tg.Update.Edited & tg.Message.DocumentMessage) | (tg.Update.Edited & tg.Message.AudioMessage) | (tg.Update.Edited & tg.Message.PhotoMessage) | (tg.Update.Edited & tg.Message.VideoMessage)>;
/**
* Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
* @param chatId Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param messageId Required if inlineMessageId is not specified. Identifier of the sent message
* @param inlineMessageId Required if chatId and messageId are not specified. Identifier of the inline message
* @param markup A JSON-serialized object for an inline keyboard.
* @returns If edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
*/
editMessageReplyMarkup(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, markup: tg.InlineKeyboardMarkup | undefined): Promise<true | (tg.Update.Edited & tg.Message)>;
editMessageLiveLocation(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, latitude: number, longitude: number, extra?: tt.ExtraEditMessageLiveLocation): Promise<true | (tg.Update.Edited & tg.Message.LocationMessage)>;
stopMessageLiveLocation(chatId: number | string | undefined, messageId: number | undefined, inlineMessageId: string | undefined, markup?: tg.InlineKeyboardMarkup): Promise<true | (tg.Update.Edited & tg.Message.LocationMessage)>;
/**
* Delete a message, including service messages, with the following limitations:
* - A message can only be deleted if it was sent less than 48 hours ago.
* - Bots can delete outgoing messages in groups and supergroups.
* - Bots granted can_post_messages permissions can delete outgoing messages in channels.
* - If the bot is an administrator of a group, it can delete any message there.
* - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
*/
deleteMessage(chatId: number | string, messageId: number): Promise<true>;
setChatStickerSet(chatId: number | string, setName: string): Promise<true>;
deleteChatStickerSet(chatId: number | string): Promise<true>;
getStickerSet(name: string): Promise<tg.StickerSet>;
/**
* Upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times).
* https://core.telegram.org/bots/api#sending-files
* @param ownerId User identifier of sticker file owner
* @param stickerFile Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px.
*/
uploadStickerFile(ownerId: number, stickerFile: tg.Opts<'uploadStickerFile'>['png_sticker']): Promise<tg.File>;
/**
* Create new sticker set owned by a user. The bot will be able to edit the created sticker set.
* @param ownerId User identifier of created sticker set owner
* @param name Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in _by_<bot username>. <bot_username> is case insensitive. 1-64 characters.
* @param title Sticker set title, 1-64 characters
*/
createNewStickerSet(ownerId: number, name: string, title: string, stickerData: tt.ExtraCreateNewStickerSet): Promise<true>;
/**
* Add a new sticker to a set created by the bot.
* @param ownerId User identifier of sticker set owner
* @param name Sticker set name
*/
addStickerToSet(ownerId: number, name: string, stickerData: tt.ExtraAddStickerToSet): Promise<true>;
/**
* Move a sticker in a set created by the bot to a specific position.
* @param sticker File identifier of the sticker
* @param position New sticker position in the set, zero-based
*/
setStickerPositionInSet(sticker: string, position: number): Promise<true>;
setStickerSetThumb(name: string, userId: number, thumb?: tg.Opts<'setStickerSetThumb'>['thumb']): Promise<true>;
/**
* Delete a sticker from a set created by the bot.
* @param sticker File identifier of the sticker
*/
deleteStickerFromSet(sticker: string): Promise<true>;
getCustomEmojiStickers(custom_emoji_ids: string[]): Promise<tg.Sticker[]>;
/**
* Get the current list of the bot's commands.
*/
getMyCommands(extra?: tg.Opts<'getMyCommands'>): Promise<tg.BotCommand[]>;
/**
* Change the list of the bot's commands.
* @param commands A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
*/
setMyCommands(commands: readonly tg.BotCommand[], extra?: tt.ExtraSetMyCommands): Promise<true>;
deleteMyCommands(extra?: tg.Opts<'deleteMyCommands'>): Promise<true>;
setPassportDataErrors(userId: number, errors: readonly tg.PassportElementError[]): Promise<true>;
/**
* Send copy of existing message.
* @deprecated use `copyMessage` instead
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param message Received message object
*/
sendCopy(chatId: number | string, message: tg.Message, extra?: tt.ExtraCopyMessage): Promise<tg.MessageId>;
/**
* Send copy of existing message.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param fromChatId Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
* @param messageId Message identifier in the chat specified in from_chat_id
*/
copyMessage(chatId: number | string, fromChatId: number | string, messageId: number, extra?: tt.ExtraCopyMessage): Promise<tg.MessageId>;
/**
* Approve a chat join request.
* The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param userId Unique identifier of the target user
*/
approveChatJoinRequest(chatId: number | string, userId: number): Promise<true>;
/**
* Decline a chat join request.
* The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param userId Unique identifier of the target user
*/
declineChatJoinRequest(chatId: number | string, userId: number): Promise<true>;
/**
* Ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first.
* The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param senderChatId Unique identifier of the target sender chat
*/
banChatSenderChat(chatId: number | string, senderChatId: number, extra?: tt.ExtraBanChatSenderChat): Promise<true>;
/**
* Unban a previously banned channel chat in a supergroup or channel.
* The bot must be an administrator for this to work and must have the appropriate administrator rights.
* @param chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername)
* @param senderChatId Unique identifier of the target sender chat
*/
unbanChatSenderChat(chatId: number | string, senderChatId: number): Promise<true>;
/**
* Use this method to change the bot's menu button in a private chat, or the default menu button. Returns true on success.
* @param chatId Unique identifier for the target private chat. If not specified, default bot's menu button will be changed.
* @param menuButton An object for the bot's new menu button.
*/
setChatMenuButton({ chatId, menuButton, }?: {
chatId?: number | undefined;
menuButton?: tg.MenuButton | undefined;
}): Promise<true>;
/**
* Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
* @param chatId Unique identifier for the target private chat. If not specified, default bot's menu button will be returned.
*/
getChatMenuButton({ chatId }?: {
chatId?: number;
}): Promise<tg.MenuButton>;
/**
* Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels.
* These rights will be suggested to users, but they are are free to modify the list before adding the bot.
*/
setMyDefaultAdministratorRights({ rights, forChannels, }?: {
rights?: tg.ChatAdministratorRights;
forChannels?: boolean;
}): Promise<true>;
/**
* Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
* @param forChannels Pass true to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.
*/
getMyDefaultAdministratorRights({ forChannels, }?: {
forChannels?: boolean;
}): Promise<tg.ChatAdministratorRights>;
/**
* Log out from the cloud Bot API server before launching the bot locally.
*/
logOut(): Promise<true>;
/**
* Close the bot instance before moving it from one local server to another.
*/
close(): Promise<true>;
}
export default Telegram;
//# sourceMappingURL=telegram.d.ts.map

1
node_modules/telegraf/typings/telegram.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

15
node_modules/telegraf/typings/util.d.ts generated vendored Normal file
View file

@ -0,0 +1,15 @@
/// <reference types="node" />
import { FmtString } from './format';
export declare const env: NodeJS.ProcessEnv;
export declare type Expand<T> = T extends object ? T extends infer O ? {
[K in keyof O]: O[K];
} : never : T;
declare type MaybeExtra<Extra> = (Extra & {
caption?: string;
}) | undefined;
export declare function fmtCaption<Extra extends {
caption?: string | FmtString;
} & Record<string, unknown>>(extra?: Extra): MaybeExtra<Extra>;
export declare function deprecate(method: string, ignorable: string | undefined, use: string | undefined, see?: string): void;
export {};
//# sourceMappingURL=util.d.ts.map

1
node_modules/telegraf/typings/util.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,eAAO,MAAM,GAAG,mBAAc,CAAA;AAE9B,oBAAY,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACpC,CAAC,SAAS,MAAM,CAAC,GACf;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GACxB,KAAK,GACP,CAAC,CAAA;AAEL,aAAK,UAAU,CAAC,KAAK,IAAI,CAAC,KAAK,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAA;AAEnE,wBAAgB,UAAU,CACxB,KAAK,SAAS;IACZ,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3B,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAYlC;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,GAAG,CAAC,EAAE,MAAM,QAmBb"}