TgKit library and website are still in early development!

Client Class

extends EventEmitter

Methods

[captureRejectionSymbol]addListeneraddStickerToSetanswerCallbackQueryanswerPreCheckoutQueryanswerShippingQueryanswerWebAppQueryapproveChatJoinRequestbanChatMemberbanChatSenderChatclosecloseForumTopiccloseGeneralForumTopiccopyMessagecreateChatInviteLinkcreateForumTopiccreateInvoiceLinkcreateNewStickerSetdeclineChatJoinRequestdeleteChatPhotodeleteChatStickerSetdeleteForumTopicdeleteMessagedeleteMessagesdeleteMyCommandsdeleteStickerFromSetdeleteStickerSeteditChatInviteLinkeditForumTopiceditGeneralForumTopiceditInlineMessageCaptioneditInlineMessageMediaeditInlineMessageReplyMarkupeditInlineMessageTexteditMessageCaptioneditMessageMediaeditMessageReplyMarkupeditMessageTextemiteventNamesexportChatInviteLinkforwardMessagegetAvailableGiftsgetBusinessConnectiongetChatgetChatAdministratorsgetChatMembergetChatMemberCountgetChatMenuButtongetCustomEmojiStickersgetFilegetForumTopicIconStickersgetGameHighScoresgetMaxListenersgetMegetMyCommandsgetMyDefaultAdministratorRightsgetMyDescriptiongetMyNamegetMyShortDescriptiongetStarTransactionsgetStickerSetgetUpdatesgetUserChatBoostsgetUserProfilePhotoshideGeneralForumTopicleaveChatlistenerCountlistenerslogOutoffononcepinChatMessageprependListenerprependOnceListenerpromoteChatMemberrawListenersrefundStarPaymentremoveAllListenersremoveListenerreopenForumTopicreopenGeneralForumTopicrestrictChatMemberrevokeChatInviteLinksendAnimationsendAudiosendChatActionsendContactsendDicesendDocumentsendGamesendGiftsendInvoicesendLocationsendMediaGroupsendMessagesendPhotosendPollsendStickersendVenuesendVideosendVideoNotesendVoicesetChatAdministratorCustomTitlesetChatDescriptionsetChatMenuButtonsetChatPermissionssetChatPhotosetChatStickerSetsetChatTitlesetCustomEmojiStickerSetThumbnailsetGameScoresetMaxListenerssetMessageReactionsetMyCommandssetMyDefaultAdministratorRightssetMyDescriptionsetMyNamesetMyShortDescriptionsetPassportDataErrorssetStickerEmojiListsetStickerKeywordssetStickerMaskPositionsetStickerPositionInSetsetStickerSetThumbnailsetStickerTitlestopPollunbanChatMemberunbanChatSenderChatunhideGeneralForumTopicunpinAllChatMessagesunpinAllForumTopicMessagesunpinAllGeneralForumTopicMessagesunpinChatMessageuploadStickerFileaddAbortListenergetEventListenersgetMaxListenerslistenerCountononcesetMaxListeners

Properties

eventManager EventManager

See the code

options ClientOptions

See the code

polling PollingManager

See the code

rest RestManager

See the code

token string

See the code

webhook WebhookManager

See the code

captureRejectionSymbol

See the code

captureRejections boolean

Sets or gets the default captureRejection value for all emitters.

See the code

defaultMaxListeners number

See the code

errorMonitor

This symbol shall be used to install a listener for only monitoring

See the code

Methods

[captureRejectionSymbol](error: Error, event: string, args: undefined): void

See the code

addListener(eventName: undefined, listener: undefined): this

See the code

addStickerToSet(userId: number, name: string, sticker: InputSticker): Promise

See the code

answerCallbackQuery(callbackQueryId: string, options: CallbackQueryAnswerOptions): Promise

See the code

answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, options: PreCheckoutQueryAnswerOptions): Promise

See the code

answerShippingQuery(shippingQueryId: string, ok: boolean, options: ShippingQueryAnswerOptions): Promise

See the code

answerWebAppQuery(webAppQueryId: string, result: InlineQueryResult): Promise

See the code

approveChatJoinRequest(chatId: ChatId, userId: number): Promise

See the code

banChatMember(chatId: ChatId, userId: number, options: ChatMemberBanOptions): Promise

See the code

banChatSenderChat(chatId: ChatId, senderId: number): Promise

See the code

close(): Promise

See the code

closeForumTopic(chatId: ChatId, forumTopicId: number): Promise

See the code

closeGeneralForumTopic(chatId: ChatId): Promise

See the code

copyMessage(fromChatId: ChatId, messageId: number, chatId: ChatId, options: MessageCopyOptions): Promise

See the code

createForumTopic(chatId: ChatId, name: string, options: ForumTopicCreateOptions): Promise

See the code

createNewStickerSet(options: StickerSetCreateOptions): Promise

See the code

declineChatJoinRequest(chatId: ChatId, userId: number): Promise

See the code

deleteChatPhoto(chatId: ChatId): Promise

See the code

deleteChatStickerSet(chatId: ChatId): Promise

See the code

deleteForumTopic(chatId: ChatId, forumTopicId: number): Promise

See the code

deleteMessage(chatId: ChatId, messageId: number): Promise

See the code

deleteMessages(chatId: ChatId, messageIds: undefined): Promise

See the code

deleteMyCommands(options: MyCommandsDeleteOptions): Promise

See the code

deleteStickerFromSet(sticker: string): Promise

See the code

deleteStickerSet(name: string): Promise

See the code

editForumTopic(chatId: ChatId, forumTopicId: number, options: ForumTopicEditOptions): Promise

See the code

editGeneralForumTopic(chatId: ChatId, options: GeneralForumTopicEditOptions): Promise

See the code

editInlineMessageCaption(inlineMessageId: string, caption: undefined, options: MessageEditCaptionOptions): Promise

See the code

editInlineMessageMedia(inlineMessageId: string, media: InputMedia, options: MessageEditMediaOptions): Promise

See the code

editInlineMessageReplyMarkup(inlineMessageId: string, replyMarkup: InlineKeyboardMarkup, options: MessageEditReplyMarkupOptions): Promise

See the code

editInlineMessageText(inlineMessageId: string, text: string, options: MessageEditTextOptions): Promise

See the code

editMessageCaption(chatId: ChatId, messageId: number, caption: undefined, options: MessageEditCaptionOptions): Promise

See the code

editMessageMedia(chatId: ChatId, messageId: number, media: InputMedia, options: MessageEditMediaOptions): Promise

See the code

editMessageReplyMarkup(chatId: ChatId, messageId: number, replyMarkup: InlineKeyboardMarkup, options: MessageEditReplyMarkupOptions): Promise

See the code

editMessageText(chatId: ChatId, messageId: number, text: string, options: MessageEditTextOptions): Promise

See the code

emit(eventName: undefined, args: undefined): boolean

See the code

eventNames():

See the code

forwardMessage(fromChatId: ChatId, messageId: number, chatId: ChatId, options: MessageForwardOptions): Promise

See the code

getAvailableGifts(): Promise

See the code

getBusinessConnection(businessConnectionId: string): Promise

See the code

getChat(chatId: ChatId): Promise

See the code

getChatAdministrators(chatId: ChatId): Promise

See the code

getChatMember(chatId: ChatId, userId: number): Promise

See the code

getChatMemberCount(chatId: ChatId): Promise

See the code

getChatMenuButton(chatId: ChatId): Promise

See the code

getCustomEmojiStickers(customEmojiIds: undefined): Promise

See the code

getFile(fileId: string): Promise

See the code

getForumTopicIconStickers(): Promise

See the code

getGameHighScores(userId: number, options: GameHighScoreGetOptions): Promise

See the code

getMaxListeners(): number

See the code

getMe(): Promise

See the code

getMyCommands(options: MyCommandsGetOptions): Promise

See the code

getMyDefaultAdministratorRights(options: MyDefaultAdministratorRightsSetOptions): Promise

See the code

getMyDescription(languageCode: string): Promise

See the code

getMyName(languageCode: string): Promise

See the code

getMyShortDescription(languageCode: string): Promise

See the code

getStarTransactions(options: StarTransactionsGetOptions): Promise

See the code

getStickerSet(name: string): Promise

See the code

getUpdates(): Promise

See the code

getUserChatBoosts(chatId: ChatId, userId: number): Promise

See the code

getUserProfilePhotos(userId: number, options: UserProfilePhotosGetOptions): Promise

See the code

hideGeneralForumTopic(chatId: ChatId): Promise

See the code

leaveChat(chatId: ChatId): Promise

See the code

listenerCount(eventName: undefined, listener: Function): number

See the code

listeners(eventName: undefined):

See the code

logOut(): Promise

See the code

off(eventName: undefined, listener: undefined): this

See the code

on(event: K, listener: undefined): Client

See the code

once(event: K, listener: undefined): Client

See the code

pinChatMessage(chatId: ChatId, messageId: number, options: ChatMessagePinOptions): Promise

See the code

prependListener(eventName: undefined, listener: undefined): this

See the code

prependOnceListener(eventName: undefined, listener: undefined): this

See the code

promoteChatMember(chatId: ChatId, userId: number, options: ChatMemberPromoteOptions): Promise

See the code

rawListeners(eventName: undefined):

See the code

refundStarPayment(userId: number, telegramPaymentChargeId: string): Promise

See the code

removeAllListeners(event: undefined): this

See the code

removeListener(eventName: undefined, listener: undefined): this

See the code

reopenForumTopic(chatId: ChatId, forumTopicId: number): Promise

See the code

reopenGeneralForumTopic(chatId: ChatId): Promise

See the code

restrictChatMember(chatId: ChatId, userId: number, permissions: ChatPermissions, options: ChatMemberRestrictOptions): Promise

See the code

sendAnimation(chatId: ChatId, animation: string, options: AnimationMessageSendOptions): Promise

See the code

sendAudio(chatId: ChatId, audio: string, options: AudioMessageSendOptions): Promise

See the code

sendChatAction(chatId: ChatId, action: ChatAction, options: ChatActionSendOptions): Promise

See the code

sendContact(chatId: ChatId, contact: ContactOptions, options: ContactMessageSendOptions): Promise

See the code

sendDice(chatId: ChatId, emoji: DiceEmoji, options: DiceMessageSendOptions): Promise

See the code

sendDocument(chatId: ChatId, document: string, options: DocumentMessageSendOptions): Promise

See the code

sendGame(chatId: ChatId, gameShortName: string, options: GameSendOptions): Promise

See the code

sendGift(userId: number, giftId: string, options: GiftSendOptions): Promise

See the code

sendInvoice(chatId: ChatId, options: InvoiceSendOptions): Promise

See the code

sendLocation(chatId: ChatId, latitude: number, longitude: number, options: LocationMessageSendOptions): Promise

See the code

sendMediaGroup(chatId: ChatId, media: undefined, options: MediaGroupMessageSendOptions): Promise

See the code

sendMessage(chatId: ChatId, text: string, options: TextMessageSendOptions): Promise

See the code

sendPhoto(chatId: ChatId, photo: string, options: PhotoMessageSendOptions): Promise

See the code

sendPoll(chatId: ChatId, poll: PollOptions, options: PollMessageSendOptions): Promise

See the code

sendSticker(chatId: ChatId, sticker: string, options: StickerSendOptions): Promise

See the code

sendVenue(chatId: ChatId, venue: VenueOptions, options: VenueMessageSendOptions): Promise

See the code

sendVideo(chatId: ChatId, video: string, options: VideoMessageSendOptions): Promise

See the code

sendVideoNote(chatId: ChatId, videoNote: string, options: VideoNoteMessageSendOptions): Promise

See the code

sendVoice(chatId: ChatId, voice: string, options: VoiceMessageSendOptions): Promise

See the code

setChatAdministratorCustomTitle(chatId: ChatId, userId: number, customTitle: string): Promise

See the code

setChatDescription(chatId: ChatId, description: string): Promise

See the code

setChatMenuButton(chatId: ChatId, menuButton: MenuButton): Promise

See the code

setChatPermissions(chatId: ChatId, permissions: ChatPermissions): Promise

See the code

setChatPhoto(chatId: ChatId, photo: string): Promise

See the code

setChatStickerSet(chatId: ChatId, stickerSetName: string): Promise

See the code

setChatTitle(chatId: ChatId, title: string): Promise

See the code

setCustomEmojiStickerSetThumbnail(name: string, customEmojiId: string): Promise

See the code

setGameScore(userId: number, score: number, options: GameScoreSetOptions): Promise

See the code

setMaxListeners(n: number): this

See the code

setMessageReaction(chatId: ChatId, messageId: number, reaction: undefined, options: MessageReactionSetOptons): Promise

See the code

setMyCommands(commands: undefined, options: MyCommandsSetOptions): Promise

See the code

setMyDefaultAdministratorRights(rights: ChatAdministratorRights, options: MyDefaultAdministratorRightsSetOptions): Promise

See the code

setMyDescription(description: string, languageCode: string): Promise

See the code

setMyName(name: string, languageCode: string): Promise

See the code

setMyShortDescription(shortDescription: string, languageCode: string): Promise

See the code

setPassportDataErrors(userId: number, errors: undefined): Promise

See the code

setStickerEmojiList(sticker: string, emojiList: undefined): Promise

See the code

setStickerKeywords(sticker: string, keywords: undefined): Promise

See the code

setStickerMaskPosition(sticker: string, maskPosition: MaskPosition): Promise

See the code

setStickerPositionInSet(sticker: string, position: number): Promise

See the code

setStickerSetThumbnail(name: string, userId: number, thumbnail: string): Promise

See the code

setStickerTitle(sticker: string, title: string): Promise

See the code

stopPoll(chatId: ChatId, messageId: number, options: PollStopOptions): Promise

See the code

unbanChatMember(chatId: ChatId, userId: number, options: ChatMemberUnbanOptions): Promise

See the code

unbanChatSenderChat(chatId: ChatId, senderId: number): Promise

See the code

unhideGeneralForumTopic(chatId: ChatId): Promise

See the code

unpinAllChatMessages(chatId: ChatId): Promise

See the code

unpinAllForumTopicMessages(chatId: ChatId, forumTopicId: number): Promise

See the code

unpinAllGeneralForumTopicMessages(chatId: ChatId): Promise

See the code

unpinChatMessage(chatId: ChatId, messageId: number): Promise

See the code

uploadStickerFile(userId: number, sticker: string, stickerFormat: StickerFormat): Promise

See the code

addAbortListener(signal: AbortSignal, resource: undefined): Disposable

See the code

getEventListeners(emitter: undefined, name: undefined):

See the code

getMaxListeners(emitter: undefined): number

See the code

listenerCount(emitter: EventEmitter, eventName: undefined): number

See the code

on(emitter: EventEmitter, eventName: string, options: StaticEventEmitterOptions): AsyncIterableIterator

See the code

once(emitter: _NodeEventTarget, eventName: undefined, options: StaticEventEmitterOptions): Promise

See the code

setMaxListeners(n: number, eventTargets: undefined): void

See the code