import { type Context } from "https://deno.land/x/mtkruto@0.1.114/mod.ts";
Properties
msg: undefined extends this["message"] ? undefined extends this["editedMessage"] ? undefined extends this["callbackQuery"] ? never : this["callbackQuery"] extends With<CallbackQuery, "message"> ? this["callbackQuery"]["message"] : this["callbackQuery"] extends With<CallbackQuery, "inlineMessageId"> ? never : (Message | undefined) : this["editedMessage"] : this["message"]
Resolves to ctx.message ?? ctx.editedMessage ?? ctx.callbackQuery?.message
.
from: this["message"] extends Message ? this["message"]["from"] : this["editedMessage"] extends Message ? this["editedMessage"]["from"] : this["callbackQuery"] extends CallbackQuery ? this["callbackQuery"]["from"] : this["inlineQuery"] extends InlineQuery ? this["inlineQuery"]["from"] : never
Resolves to (ctx.message ?? ctx.editedMessage)?.from ?? ctx.callbackQuery?.from ?? ctx.inlineQuery?.from
.
reply: (text: string, params?: Omit<SendMessageParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "text">>
Reply the received message with a text message.
replyPoll: () => Promise<With<Message, "poll">>
question: string,
options: [string, string, ...string[]],
params?: Omit<SendPollParams, "replyToMessageId"> & ReplyParams,
Reply the received message with a poll.
replyPhoto: (photo: FileSource, params?: Omit<SendPhotoParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "photo">>
Reply the received message with a photo.
editMessageText: () => Promise<With<Message, "text">>
messageId: number,
text: string,
params?: EditMessageParams,
Edit a message in the chat which the message was received from.
answerInlineQuery: (results: InlineQueryResult[], params?: AnswerInlineQueryParams) => Promise<void>
Answer the received inline query.
forwardMessages: () => Promise<Message[]>
to: ChatID,
messageIds: number[],
params?: ForwardMessagesParams,
Forward multiple messages of the chat which the message was received from.