Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mtkruto/client/2_message_manager.ts>MessageManager

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class MessageManager
import { MessageManager } from "https://deno.land/x/mtkruto@0.1.157/client/2_message_manager.ts";

Constructors

new
MessageManager(c: C)

Properties

usernameResolver: UsernameResolver

Methods

addReaction(
chatId: number,
messageId: number,
reaction: Reaction,
)
banChatMember(
chatId: ID,
memberId: ID,
)
blockUser(userId: ID)
constructMessage(message_: enums.Message, r?: boolean)
deleteChatMemberMessages(chatId: ID, memberId: ID)
deleteChatPhoto(chatId: number)
deleteMessages(
chatId: ID,
messageIds: number[],
)
editInlineMessageText(
inlineMessageId: string,
text: string,
)
editMessageReplyMarkup(
chatId: ID,
messageId: number,
)
editMessageText(
chatId: ID,
messageId: number,
text: string,
)
forwardMessages(
from: ID,
to: ID,
messageIds: number[],
)
getHistory(chatId: ID, params?: GetHistoryParams)
getMessage(chatId: ID, messageId: number)
getMessages(chatId: ID, messageIds: number[])
getMessageWithReply(chatId: ID, messageId: number)
getStickerSetName(inputStickerSet: types.InputStickerSetID, hash?)
handleUpdate(update: MessageManagerUpdate): Promise<Update | null>
joinChat(chatId: ID)
leaveChat(chatId: ID)
parseText(text: string, params?: { parseMode?: ParseMode; entities?: MessageEntity[]; })
pinMessage(
chatId: ID,
messageId: number,
)
removeReaction(
chatId: number,
messageId: number,
reaction: Reaction,
)
resolveFileId(maybeFileId: string, expectedFileType: FileType)
searchMessages(
chatId: ID,
query: string,
)
sendAnimation(
chatId: ID,
animation: FileSource,
)
sendAudio(
chatId: ID,
audio: FileSource,
params?: SendAudioParams,
)
sendChatAction(
chatId: ID,
action: ChatAction,
params?: { messageThreadId?: number; },
)
sendContact(
chatId: ID,
firstName: string,
number: string,
)
sendDice(chatId: ID, params?: SendDiceParams)
sendDocument(
chatId: ID,
document: FileSource,
)
sendLocation(
chatId: ID,
latitude: number,
longitude: number,
)
sendMessage(
chatId: ID,
text: string,
)
sendPhoto(
chatId: ID,
photo: FileSource,
params?: SendPhotoParams,
)
sendPoll(
chatId: ID,
question: string,
options: [string, string, ...string[]],
params?: SendPollParams,
)
sendVenue(
chatId: ID,
latitude: number,
longitude: number,
title: string,
address: string,
params?: SendVenueParams,
)
sendVideo(
chatId: ID,
video: FileSource,
params?: SendVideoParams,
)
sendVoice(
chatId: ID,
voice: FileSource,
params?: SendVoiceParams,
)
setAvailableReactions(chatId: ID, availableReactions: "none" | "all" | Reaction[])
setChatMemberRights(
chatId: ID,
memberId: ID,
)
setChatPhoto(
chatId: number,
photo: FileSource,
): Promise<void>
setReactions(
chatId: number,
messageId: number,
reactions: Reaction[],
)
unbanChatMember(chatId: ID, memberId: ID)
unblockUser(userId: ID)
unpinMessage(chatId: ID, messageId: number)
unpinMessages(chatId: ID)

Static Methods

canHandleUpdate(update: enums.Update): update is MessageManagerUpdate