Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Borodin/typescript-telegram-bot-api
/ functions
Functions
202 in github.com/Borodin/typescript-telegram-bot-api
⨍
Functions
202
◇
Types & classes
12
↓ 180 callers
Method
callApi
( method: string, options?: Record<string, unknown>, abortController?: AbortController, )
src/index.ts:248
↓ 24 callers
Method
sendMessage
* ## sendMessage * Use this method to send text messages. On success, the sent Message is returned. * @see https://core.telegram.org/bots/api#se
src/index.ts:444
↓ 12 callers
Method
getMe
* ## getMe * A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information * about the bot in f
src/index.ts:410
↓ 7 callers
Method
getStickerSet
* ## getStickerSet * Use this method to get a sticker set. On success, a StickerSet object is returned. * @see https://core.telegram.org/bots/ap
src/index.ts:2958
↓ 7 callers
Method
sendPhoto
* ## sendPhoto * Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are * skipped. S
src/index.ts:704
↓ 6 callers
Method
createForumTopic
* ## createForumTopic * Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a * supergrou
src/index.ts:2325
↓ 6 callers
Method
deleteForumTopic
* ## deleteForumTopic * Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat * with
src/index.ts:2379
↓ 6 callers
Method
on
(event: U, listener: (eventData: NonNullable<allEmittedTypes[U]>) => void)
src/index.ts:4118
↓ 5 callers
Method
startPolling
()
src/index.ts:158
↓ 5 callers
Method
stopPolling
()
src/index.ts:162
↓ 4 callers
Method
isTelegramError
(error: unknown)
src/index.ts:154
↓ 4 callers
Method
sendGame
* ## sendGame * Use this method to send a game. On success, the sent Message is returned. * @see https://core.telegram.org/bots/api#sendgame
src/index.ts:3468
↓ 4 callers
Method
sendMessageDraft
* ## sendMessageDraft * Use this method to stream a partial message to a user while the message is being generated. Note that the streamed * dra
src/index.ts:1502
↓ 4 callers
Method
sendPaidMedia
* ## sendPaidMedia * Use this method to send paid media to channel chats. On success, the sent Message is returned. * @see https://core.telegram
src/index.ts:1075
↓ 3 callers
Method
createChatInviteLink
* ## createChatInviteLink * Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for * t
src/index.ts:2027
↓ 3 callers
Method
deleteWebhook
* ## deleteWebhook * Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. * @see h
src/index.ts:390
↓ 3 callers
Method
getChat
* ## getChat * Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. * @see https://core.teleg
src/index.ts:2225
↓ 3 callers
Method
reopenGeneralForumTopic
* ## reopenGeneralForumTopic * Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in
src/index.ts:2422
↓ 3 callers
Method
sendAudio
* ## sendAudio * Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio * must be in
src/index.ts:758
↓ 3 callers
Method
sendLocation
* ## sendLocation * Use this method to send point on the map. On success, the sent Message is returned. * @see https://core.telegram.org/bots/ap
src/index.ts:1226
↓ 3 callers
Method
sendPoll
* ## sendPoll * Use this method to send a native poll. On success, the sent Message is returned. * @see https://core.telegram.org/bots/api#sendp
src/index.ts:1372
↓ 2 callers
Method
addStickerToSet
* ## addStickerToSet * Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. * Other
src/index.ts:3014
↓ 2 callers
Method
answerPreCheckoutQuery
* ## answerPreCheckoutQuery * Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the *
src/index.ts:3397
↓ 2 callers
Method
answerShippingQuery
* ## answerShippingQuery * If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will *
src/index.ts:3370
↓ 2 callers
Method
closeForumTopic
* ## closeForumTopic * Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for * thi
src/index.ts:2357
↓ 2 callers
Method
closeGeneralForumTopic
* ## closeGeneralForumTopic * Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in *
src/index.ts:2411
↓ 2 callers
Method
createChatSubscriptionInviteLink
* ## createChatSubscriptionInviteLink * Use this method to create a subscription invite link for a channel chat. The bot must have the `can_invite_
src/index.ts:1998
↓ 2 callers
Method
createNewStickerSet
* ## createNewStickerSet * Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus * crea
src/index.ts:2994
↓ 2 callers
Method
deleteStickerFromSet
* ## deleteStickerFromSet * Use this method to delete a sticker from a set created by the bot. Returns True on success. * @see https://core.tele
src/index.ts:3035
↓ 2 callers
Method
deleteStickerSet
* ## deleteStickerSet * Use this method to delete a sticker set that was created by the bot. Returns True on success. * @see https://core.telegr
src/index.ts:3134
↓ 2 callers
Method
editMessageText
* ## editMessageText * Use this method to edit text, rich and game messages. On success, if the edited message is not an inline message, * the e
src/index.ts:2722
↓ 2 callers
Method
emit
(event: U, eventData: NonNullable<allEmittedTypes[U]>)
src/index.ts:4122
↓ 2 callers
Method
emitUpdate
(update: Update)
src/polling.ts:22
↓ 2 callers
Method
getAvailableGifts
* ## getAvailableGifts * Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object. * @see
src/index.ts:3532
↓ 2 callers
Method
getMyCommands
* ## getMyCommands * Use this method to get the current list of the bot's commands for the given scope and user language. Returns an * Array of
src/index.ts:2602
↓ 2 callers
Method
getStarTransactions
* ## getStarTransactions * Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object. *
src/index.ts:3420
↓ 2 callers
Method
getUserProfileAudios
* ## getUserProfileAudios * Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object. * @see https://core.
src/index.ts:1789
↓ 2 callers
Method
getWebhookInfo
* ## getWebhookInfo * Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. * If the
src/index.ts:400
↓ 2 callers
Method
hideGeneralForumTopic
* ## hideGeneralForumTopic * Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the * c
src/index.ts:2433
↓ 2 callers
Method
pinChatMessage
* ## pinChatMessage * Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the * bot mu
src/index.ts:2175
↓ 2 callers
Method
processUpdate
(update: Update)
src/index.ts:268
↓ 2 callers
Method
sendDice
* ## sendDice * Use this method to send an animated emoji that will display a random value. On success, the sent Message is * returned. * @se
src/index.ts:1456
↓ 2 callers
Method
sendDocument
## sendDocument * Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of * any type o
src/index.ts:810
↓ 2 callers
Method
sendMediaGroup
* ## sendMediaGroup * Use this method to send a group of photos, live photos, videos, documents or audios as an album. Documents and * audio fil
src/index.ts:1191
↓ 2 callers
Method
sendVoice
* ## sendVoice * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. * For this t
src/index.ts:978
↓ 2 callers
Method
serializeJSON
(value: unknown, formData: FormData)
src/index.ts:193
↓ 2 callers
Method
setChatPhoto
* ## setChatPhoto * Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be * an adm
src/index.ts:2133
↓ 2 callers
Method
setGameScore
* ## setGameScore * Use this method to set the score of the specified user in a game message. On success, if the message is not an * inline mess
src/index.ts:3499
↓ 2 callers
Method
setWebhook
* ## setWebhook * Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update * for the b
src/index.ts:333
↓ 2 callers
Method
uploadStickerFile
* ## uploadStickerFile * Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or * replace
src/index.ts:2980
↓ 1 callers
Method
answerCallbackQuery
* ## answerCallbackQuery * Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the *
src/index.ts:2464
↓ 1 callers
Method
answerChatJoinRequestQuery
* ## answerChatJoinRequestQuery * Use this method to process a received chat join request query. Returns True on success. * @see https://core.te
src/index.ts:2091
↓ 1 callers
Method
answerGuestQuery
* ## answerGuestQuery * Use this method to reply to a received guest message. On success, a SentGuestMessage object is returned. * @see https://
src/index.ts:3180
↓ 1 callers
Method
answerInlineQuery
* ## answerInlineQuery * Use this method to send answers to an inline query. On success, True is returned. * No more than 50 results per query a
src/index.ts:3144
↓ 1 callers
Method
answerWebAppQuery
* ## answerWebAppQuery * Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of * the
src/index.ts:3165
↓ 1 callers
Method
approveChatJoinRequest
* ## approveChatJoinRequest * Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and
src/index.ts:2072
↓ 1 callers
Method
approveSuggestedPost
* ## approveSuggestedPost * Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' * a
src/index.ts:4072
↓ 1 callers
Method
banChatMember
* ## banChatMember * Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the * user wi
src/index.ts:1832
↓ 1 callers
Method
banChatSenderChat
* ## banChatSenderChat * Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the * bann
src/index.ts:1950
↓ 1 callers
Method
close
* ## close * Use this method to close the bot instance before moving it from one local server to another. You need to delete the * webhook befor
src/index.ts:435
↓ 1 callers
Method
convertGiftToStars
* ## convertGiftToStars * Converts a given regular gift to Telegram Stars. Requires the * can_convert_gifts_to_stars business bot right. * Re
src/index.ts:3871
↓ 1 callers
Method
copyMessage
* ## copyMessage * Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway * winners me
src/index.ts:615
↓ 1 callers
Method
copyMessages
* ## copyMessages * Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are * skipped
src/index.ts:673
↓ 1 callers
Method
createFormData
(options?: Record<string, unknown>)
src/index.ts:238
↓ 1 callers
Method
createInvoiceLink
* ## createInvoiceLink * Use this method to create a link for an invoice. Returns the created invoice link as String on success. * @see https://
src/index.ts:3332
↓ 1 callers
Method
declineChatJoinRequest
* ## declineChatJoinRequest * Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and
src/index.ts:2082
↓ 1 callers
Method
declineSuggestedPost
* ## declineSuggestedPost * Use this method to decline a suggested post in a direct messages chat. The bot must have the * 'can_manage_direct_me
src/index.ts:4099
↓ 1 callers
Function
delay
(ms: number)
tests/index.test.ts:719
↓ 1 callers
Method
deleteAllMessageReactions
* ## deleteAllMessageReactions * Use this method to remove up to 10000 recent reactions in a group or a supergroup chat added by a given user or
src/index.ts:1734
↓ 1 callers
Method
deleteBusinessMessages
* ## deleteBusinessMessages * Delete messages on behalf of a business account. Requires * the can_delete_sent_messages business bot right to del
src/index.ts:3621
↓ 1 callers
Method
deleteChatPhoto
* ## deleteChatPhoto * Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator * in
src/index.ts:2143
↓ 1 callers
Method
deleteChatStickerSet
* ## deleteChatStickerSet * Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for *
src/index.ts:2304
↓ 1 callers
Method
deleteMessage
* ## deleteMessage * Use this method to delete a message, including service messages, with the following limitations: * - A message can only be
src/index.ts:2890
↓ 1 callers
Method
deleteMessageReaction
* ## deleteMessageReaction * Use this method to remove a reaction from a message in a group or a supergroup chat. The bot must have the * 'can_d
src/index.ts:1711
↓ 1 callers
Method
deleteMessages
* ## deleteMessages * Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they * are s
src/index.ts:2900
↓ 1 callers
Method
deleteMyCommands
* ## deleteMyCommands * Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, * higher
src/index.ts:2589
↓ 1 callers
Method
deleteStory
* ## deleteStory * Deletes a story previously posted by the bot on behalf of a managed * business account. Requires the can_manage_stories busin
src/index.ts:3998
↓ 1 callers
Method
editChatInviteLink
* ## editChatInviteLink * Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat * f
src/index.ts:2044
↓ 1 callers
Method
editChatSubscriptionInviteLink
* ## editChatSubscriptionInviteLink * Use this method to edit a subscription invite link created by the bot. The bot must have the `can_invite_user
src/index.ts:2012
↓ 1 callers
Method
editForumTopic
* ## editForumTopic * Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the * case o
src/index.ts:2341
↓ 1 callers
Method
editGeneralForumTopic
* ## editGeneralForumTopic * Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an * administra
src/index.ts:2401
↓ 1 callers
Method
editMessageCaption
* ## editMessageCaption * Use this method to edit captions of messages. On success, if the edited message is not an inline message, the * edited
src/index.ts:2757
↓ 1 callers
Method
editMessageChecklist
* ## editMessageChecklist * Use this method to edit a checklist on behalf of a connected business account. * On success, the edited Message is r
src/index.ts:4052
↓ 1 callers
Method
editMessageLiveLocation
* ## editMessageLiveLocation * Use this method to edit live location messages. A location can be edited until its live_period expires or editing
src/index.ts:2806
↓ 1 callers
Method
editMessageMedia
* ## editMessageMedia * Use this method to edit animation, audio, document, live photo, photo, or video messages, or to add media to text * mess
src/index.ts:2785
↓ 1 callers
Method
editMessageReplyMarkup
* ## editMessageReplyMarkup * Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline * me
src/index.ts:2848
↓ 1 callers
Method
editStory
* ## editStory * Edits a story previously posted by the bot on behalf of a managed business * account. Requires the can_manage_stories business
src/index.ts:3974
↓ 1 callers
Method
editUserStarSubscription
* ## editUserStarSubscription * Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
src/index.ts:3438
↓ 1 callers
Method
emitMessage
(message: Message)
src/polling.ts:11
↓ 1 callers
Method
exportChatInviteLink
* ## exportChatInviteLink * Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked.
src/index.ts:1988
↓ 1 callers
Method
forwardMessage
* ## forwardMessage * Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or * forwarded,
src/index.ts:541
↓ 1 callers
Method
forwardMessages
* ## forwardMessages * Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are * skip
src/index.ts:586
↓ 1 callers
Method
getBusinessAccountGifts
* ## getBusinessAccountGifts * Returns the gifts received and owned by a managed business account. * Requires the can_view_gifts_and_stars busin
src/index.ts:3741
↓ 1 callers
Method
getBusinessAccountStarBalance
* ## getBusinessAccountStarBalance * Returns the amount of Telegram Stars owned by a managed business account. * Requires the can_view_gifts_and
src/index.ts:3719
↓ 1 callers
Method
getBusinessConnection
* ## getBusinessConnection * Use this method to get information about the connection of the bot with a business account. Returns a * BusinessCon
src/index.ts:2490
↓ 1 callers
Method
getChatAdministrators
* ## getChatAdministrators * Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember * obje
src/index.ts:2235
↓ 1 callers
Method
getChatGifts
* ## getChatGifts * Returns the gifts owned by a chat. Returns OwnedGifts on success. * @see https://core.telegram.org/bots/api#getchatgifts
src/index.ts:3813
↓ 1 callers
Method
getChatMember
* ## getChatMember * Use this method to get information about a member of a chat. The method is only guaranteed to work for other users * if the
src/index.ts:2262
↓ 1 callers
Method
getChatMemberCount
* ## getChatMemberCount * Use this method to get the number of members in a chat. Returns Int on success. * @see https://core.telegram.org/bots/
src/index.ts:2252
↓ 1 callers
Method
getChatMenuButton
* ## getChatMenuButton * Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. * Retu
src/index.ts:2685
next →
1–100 of 202, ranked by callers