Protected
_clientProtected
_sourceReturns the matched command from the message, or undefined if no match was found.
Forwards the current message to a specified chat.
Optional
params: Partial<IForwardMessageParams>Pin the message in the chat.
Optional
params: Partial<IPinChatMessageParams>Asks a question to the user and waits for a response.
The context type. Default is IncomingMessageContext.
The text of the message to be sent, or an object containing the text and other options.
The function to run once the user responds to the question.
Replies to the current message.
Optional
params: Partial<ISendMessageParams>Sends a message to the chat.
send("Hello, World!")
send("<b>This text is bold</b>", { parse_mode: "HTML" })
send({ text: "Hello, Evogram!" })
Optional
params: Partial<ISendMessageParams>Send the action in the chat.
Converts the source object to a context object of a given type.
client.updates.on("message", message => {
const user = message.user.toContext<CustomUserContext>();
// Now user works correctly with your context
})
Generic type parameter for the context object.
The context object.
Unpin the message in the chat.
Optional
params: Partial<IUnpinChatMessageParams>Generated using TypeDoc
Checks whether the incoming message to the bot has a recognized command.