telegramx.js

ClientEvents

interface

Map of every event the can emit to its listener arguments. Message-like updates are delivered as rich structures; the rest carry the raw, fully typed Bot API objects (reachable and self-documenting via the generated types).

Declaration

interface ClientEvents 

Properties

businessConnection: [connection: T.BusinessConnection];
businessMessage: [message: Message];
callbackQuery: [query: CallbackQuery];
channelPostproperty#
channelPost: [message: Message];
chatBoostproperty#
chatBoost: [boost: T.ChatBoostUpdated];
chatJoinRequest: [request: T.ChatJoinRequest];
chatMemberproperty#
chatMember: [update: T.ChatMemberUpdated];
chosenInlineResult: [result: T.ChosenInlineResult];
deletedBusinessMessages: [messages: T.BusinessMessagesDeleted];
editedBusinessMessage: [message: Message];
editedChannelPost: [message: Message];
editedMessage: [message: Message];
errorproperty#
error: [error: Error];

Emitted on any error thrown while processing an update.

guestMessage: [message: Message];
inlineQueryproperty#
inlineQuery: [query: InlineQuery];
managedBotproperty#
managedBot: [update: T.ManagedBotUpdated];
messageproperty#
message: [message: Message];
messageReaction: [reaction: T.MessageReactionUpdated];
messageReactionCount: [reaction: T.MessageReactionCountUpdated];
myChatMember: [update: T.ChatMemberUpdated];
pollproperty#
poll: [poll: T.Poll];
pollAnswerproperty#
pollAnswer: [answer: T.PollAnswer];
preCheckoutQuery: [query: T.PreCheckoutQuery];
purchasedPaidMedia: [purchase: T.PaidMediaPurchased];
rawUpdateproperty#
rawUpdate: [update: T.Update];

Emitted for every raw update, before it is routed to a specific event.

readyproperty#
ready: [user: ClientUser];

Emitted once the client has logged in and getMe has resolved.

removedChatBoost: [boost: T.ChatBoostRemoved];
shippingQuery: [query: T.ShippingQuery];