Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SceneContext<D>

Type parameters

Hierarchy

Index

Properties

Accessors

Methods

Properties

Readonly botInfo

botInfo: UserFromGetMe

scene

session

session: SceneSession<D>

Readonly state

state: Record<string | symbol, any> = ...

Readonly tg

Readonly update

update: Update

Accessors

callbackQuery

  • get callbackQuery(): PropOr<U, "callback_query", undefined>
  • Returns PropOr<U, "callback_query", undefined>

channelPost

  • get channelPost(): PropOr<U, "channel_post", undefined>
  • Returns PropOr<U, "channel_post", undefined>

chat

  • get chat(): PropOr<GetUpdateContent<U>, "chat", undefined>
  • Returns PropOr<GetUpdateContent<U>, "chat", undefined>

chatMember

  • get chatMember(): PropOr<U, "chat_member", undefined>
  • Returns PropOr<U, "chat_member", undefined>

chosenInlineResult

  • get chosenInlineResult(): PropOr<U, "chosen_inline_result", undefined>
  • Returns PropOr<U, "chosen_inline_result", undefined>

editedChannelPost

  • get editedChannelPost(): PropOr<U, "edited_channel_post", undefined>
  • Returns PropOr<U, "edited_channel_post", undefined>

editedMessage

  • get editedMessage(): PropOr<U, "edited_message", undefined>
  • Returns PropOr<U, "edited_message", undefined>

from

  • get from(): PropOr<GetUpdateContent<U>, "from", undefined>
  • Returns PropOr<GetUpdateContent<U>, "from", undefined>

inlineMessageId

  • get inlineMessageId(): undefined | string

inlineQuery

  • get inlineQuery(): PropOr<U, "inline_query", undefined>
  • Returns PropOr<U, "inline_query", undefined>

me

  • get me(): string

message

  • get message(): PropOr<U, "message", undefined>
  • Returns PropOr<U, "message", undefined>

myChatMember

  • get myChatMember(): PropOr<U, "my_chat_member", undefined>
  • Returns PropOr<U, "my_chat_member", undefined>

passportData

  • get passportData(): undefined | PassportData

poll

  • get poll(): PropOr<U, "poll", undefined>

pollAnswer

  • get pollAnswer(): PropOr<U, "poll_answer", undefined>
  • Returns PropOr<U, "poll_answer", undefined>

preCheckoutQuery

  • get preCheckoutQuery(): PropOr<U, "pre_checkout_query", undefined>
  • Returns PropOr<U, "pre_checkout_query", undefined>

senderChat

  • get senderChat(): PropOr<GetUpdateContent<U>, "sender_chat", undefined>
  • Returns PropOr<GetUpdateContent<U>, "sender_chat", undefined>

shippingQuery

  • get shippingQuery(): PropOr<U, "shipping_query", undefined>
  • Returns PropOr<U, "shipping_query", undefined>

telegram

updateType

  • get updateType(): Extract<UnionKeys<U>, UpdateType>

webhookReply

  • get webhookReply(): boolean
  • set webhookReply(enable: boolean): void

Methods

addStickerToSet

answerCbQuery

answerGameQuery

  • answerGameQuery(...args: [url: string]): Promise<true>

answerInlineQuery

  • answerInlineQuery(...args: [results: readonly InlineQueryResult[], extra?: ExtraAnswerInlineQuery]): Promise<true>

answerPreCheckoutQuery

  • answerPreCheckoutQuery(...args: [ok: boolean, errorMessage?: string]): Promise<true>

answerShippingQuery

  • answerShippingQuery(...args: [ok: boolean, shippingOptions: readonly ShippingOption[], errorMessage: string]): Promise<true>

copyMessage

  • copyMessage(chatId: string | number, extra?: ExtraCopyMessage): Promise<MessageId>

createChatInviteLink

createNewStickerSet

deleteChatPhoto

  • deleteChatPhoto(...args: []): Promise<true>

deleteChatStickerSet

  • deleteChatStickerSet(): Promise<true>

deleteMessage

  • deleteMessage(messageId?: number): Promise<true>

deleteStickerFromSet

  • deleteStickerFromSet(sticker: string): Promise<true>

editChatInviteLink

editMessageCaption

  • editMessageCaption(caption: undefined | string, extra?: ExtraEditMessageCaption): Promise<true | (Edited & CaptionableMessage)>

editMessageLiveLocation

  • editMessageLiveLocation(latitude: number, longitude: number, extra?: ExtraEditMessageLiveLocation): Promise<true | (Edited & LocationMessage)>

editMessageMedia

  • editMessageMedia(media: {} | {} | {} | {} | {}, extra?: ExtraEditMessageMedia): Promise<true | (Edited & AnimationMessage) | (Edited & AudioMessage) | (Edited & DocumentMessage) | (Edited & PhotoMessage) | (Edited & VideoMessage)>

editMessageReplyMarkup

  • editMessageReplyMarkup(markup: undefined | InlineKeyboardMarkup): Promise<true | (Edited & ServiceMessageBundle | CommonMessageBundle)>

editMessageText

  • editMessageText(text: string, extra?: ExtraEditMessageText): Promise<true | (Edited & TextMessage)>

exportChatInviteLink

  • exportChatInviteLink(...args: []): Promise<string>

forwardMessage

  • forwardMessage(chatId: string | number, extra?: { disable_notification?: undefined | boolean }): Promise<ServiceMessageBundle | CommonMessageBundle>

getChat

  • getChat(...args: []): Promise<ChatFromGetChat>

getChatAdministrators

  • getChatAdministrators(...args: []): Promise<ChatMember[]>

getChatMember

  • getChatMember(...args: [userId: number]): Promise<ChatMember>

getChatMembersCount

  • getChatMembersCount(...args: []): Promise<number>

getMyCommands

  • getMyCommands(): Promise<BotCommand[]>

getStickerSet

  • getStickerSet(setName: string): Promise<StickerSet>

kickChatMember

  • kickChatMember(...args: [userId: number, untilDate?: number, extra?: ExtraKickChatMember]): Promise<true>

leaveChat

  • leaveChat(...args: []): Promise<true>

pinChatMessage

  • pinChatMessage(...args: [messageId: number, extra?: { disable_notification?: undefined | boolean }]): Promise<true>

promoteChatMember

reply

replyWithAnimation

  • replyWithAnimation(...args: [animation: string | InputFile, extra?: ExtraAnimation]): Promise<AnimationMessage>

replyWithAudio

  • replyWithAudio(...args: [audio: string | InputFile, extra?: ExtraAudio]): Promise<AudioMessage>

replyWithChatAction

  • replyWithChatAction(...args: [action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "find_location" | "record_video_note" | "upload_video_note"]): Promise<true>

replyWithContact

  • replyWithContact(...args: [phoneNumber: string, firstName: string, extra?: ExtraContact]): Promise<ContactMessage>

replyWithDice

  • replyWithDice(...args: [extra?: ExtraDice]): Promise<DiceMessage>

replyWithDocument

  • replyWithDocument(...args: [document: string | InputFile, extra?: ExtraDocument]): Promise<DocumentMessage>

replyWithGame

  • replyWithGame(...args: [gameName: string, extra?: ExtraGame]): Promise<GameMessage>

replyWithHTML

replyWithInvoice

replyWithLocation

  • replyWithLocation(...args: [latitude: number, longitude: number, extra?: ExtraLocation]): Promise<LocationMessage>

replyWithMarkdown

  • replyWithMarkdown(markdown: string, extra?: ExtraReplyMessage): Promise<TextMessage>

replyWithMarkdownV2

  • replyWithMarkdownV2(markdown: string, extra?: ExtraReplyMessage): Promise<TextMessage>

replyWithMediaGroup

  • replyWithMediaGroup(...args: [media: readonly ({} | {})[] | readonly {}[] | readonly {}[], extra?: ExtraMediaGroup]): Promise<(DocumentMessage | AudioMessage | PhotoMessage | VideoMessage)[]>

replyWithPhoto

  • replyWithPhoto(...args: [photo: string | InputFile, extra?: ExtraPhoto]): Promise<PhotoMessage>

replyWithPoll

  • replyWithPoll(...args: [question: string, options: readonly string[], extra?: ExtraPoll]): Promise<PollMessage>

replyWithQuiz

  • replyWithQuiz(...args: [question: string, options: readonly string[], extra: ExtraPoll]): Promise<PollMessage>

replyWithSticker

  • replyWithSticker(...args: [sticker: string | InputFile, extra?: ExtraSticker]): Promise<StickerMessage>

replyWithVenue

  • replyWithVenue(...args: [latitude: number, longitude: number, title: string, address: string, extra?: ExtraVenue]): Promise<VenueMessage>

replyWithVideo

  • replyWithVideo(...args: [video: string | InputFile, extra?: ExtraVideo]): Promise<VideoMessage>

replyWithVideoNote

  • replyWithVideoNote(...args: [videoNote: string | InputFileVideoNote, extra?: ExtraVideoNote]): Promise<VideoNoteMessage>

replyWithVoice

  • replyWithVoice(...args: [voice: string | InputFile, extra?: ExtraVoice]): Promise<VoiceMessage>

restrictChatMember

revokeChatInviteLink

  • revokeChatInviteLink(...args: [inviteLink: string]): Promise<ChatInviteLink>

setChatAdministratorCustomTitle

  • setChatAdministratorCustomTitle(...args: [userId: number, title: string]): Promise<true>

setChatDescription

  • setChatDescription(...args: [description?: string]): Promise<true>

setChatPermissions

  • setChatPermissions(...args: [permissions: ChatPermissions]): Promise<true>

setChatPhoto

  • setChatPhoto(...args: [photo: InputFile]): Promise<true>

setChatStickerSet

  • setChatStickerSet(setName: string): Promise<true>

setChatTitle

  • setChatTitle(...args: [title: string]): Promise<true>

setMyCommands

  • setMyCommands(commands: readonly BotCommand[]): Promise<true>

setPassportDataErrors

  • setPassportDataErrors(errors: readonly PassportElementError[]): Promise<true>

setStickerPositionInSet

  • setStickerPositionInSet(sticker: string, position: number): Promise<true>

setStickerSetThumb

  • setStickerSetThumb(...args: [name: string, userId: number, thumb: string | InputFile]): Promise<true>

stopMessageLiveLocation

  • stopMessageLiveLocation(markup?: InlineKeyboardMarkup): Promise<true | (Edited & LocationMessage)>

stopPoll

  • stopPoll(...args: [messageId: number, extra?: ExtraStopPoll]): Promise<Poll>

unbanChatMember

  • unbanChatMember(...args: [userId: number, extra?: { only_if_banned?: undefined | boolean }]): Promise<true>

unpinAllChatMessages

  • unpinAllChatMessages(...args: []): Promise<true>

unpinChatMessage

  • unpinChatMessage(...args: [messageId?: number]): Promise<true>

uploadStickerFile

  • uploadStickerFile(...args: [stickerFile: InputFile]): Promise<File>

Generated using TypeDoc