Skip to content

Methods & Coverage ​

mtgo-bot-api implements 180 official Bot API methods — 100% of the Bot API 10.1 surface. If a method exists on api.telegram.org, it exists here with the same parameters, response shape, and error mapping.

Method categories ​

CategoryMethodsNotes
Getting updatesgetUpdatesLong polling, webhook conflict detection, 409 on concurrent calls, negative offset, byte-budget truncation
WebhookssetWebhook, deleteWebhook, getWebhookInfoHTTPS validation, secret token, TCP/TLS readiness probe, max_connections
MessagessendMessage, editMessageText/Caption/Media/ReplyMarkup, deleteMessage(s), forwardMessage(s), copyMessage(s)HTML + MarkdownV2 + plain text
MediasendPhoto, sendDocument, sendAudio, sendVideo, sendAnimation, sendVoice, sendVideoNote, sendSticker, sendMediaGroupUpload + re-send by file_id
InteractivesendContact, sendVenue, sendLocation, sendDice, sendPoll, stopPoll, sendPaidMedia, setMessageReaction
Chat managementgetChat, getChatMember(s), leaveChat, setChatTitle/Description/Photo/Permissions/StickerSet/MenuButton
AdminpromoteChatMember, restrictChatMember, banChatMember, unbanChatMember, banChatSenderChatChatBannedRights inversion handled
Forum topicscreateForumTopic, editForumTopic, close/reopen/deleteForumTopic, edit/close/reopen/hide/unhideGeneralForumTopic12 methods
Sticker setsgetStickerSet, createNewStickerSet, addStickerToSet, setStickerSetTitle/Thumbnail/EmojiList, deleteStickerSet16 methods, full CRUD
Inline modeanswerInlineQuery, answerCallbackQuery, setGameScore, getGameHighScores, answerWebAppQuery, answerGuestQuery, savePreparedInlineMessages/KeyboardButton, sendCustomRequest, answerCustomQuery
Bot profilegetMyCommands/setMyCommands/deleteMyCommands, getMyName/setMyName, getMyDescription/setMyDescription, getMyShortDescription/setMyShortDescriptionVia BotsGetBotInfo/BotsSetBotInfo
PaymentssendInvoice, createInvoiceLink, answerShippingQuery, answerPreCheckoutQuery, refundStarPayment, getMyStarBalance, getStarTransactions, sendGift, giftPremiumSubscription, getAvailableGifts, getUserGifts, getChatGifts, transferGift, upgradeGift, convertGiftToStars, editUserStarSubscription, getUserChatBoostsStars, invoices, gifts, subscriptions
BusinessgetBusinessConnection, setBusinessAccountName/Bio/Username, readBusinessMessage, deleteBusinessMessages, setBusinessAccountProfilePhoto, getBusinessAccountStarBalance, transferBusinessAccountStars, getBusinessAccountGifts12 methods
StoriespostStory, editStory, deleteStory, repostStory, sendLivePhoto
Rich messagessendRichMessage, sendRichMessageDraft, sendMessageDraft, sendChecklist, editMessageChecklistRichBlock (21 types) + RichText (27 types)
File operationsgetFile, uploadStickerFileDownload via upload.getFile, file_id parity
VerificationverifyChat, verifyUser, removeChatVerification, removeUserVerification
LifecyclegetMe, logout, close
Invite linksexportChatInviteLink, createChatInviteLink, editChatInviteLink, revokeChatInviteLink, createChatSubscriptionInviteLink, approve/declineChatJoinRequest, answerChatJoinRequestQuery
ModerationapproveSuggestedPost, declineSuggestedPost, deleteMessageReaction, deleteAllMessageReactions

Full reference

Parameter-level documentation for every method lives at the official Bot API reference. Since mtgo-bot-api is a behavioral clone, that reference is authoritative here too.

Parity verification ​

Field-shape parity is verified with a grammY-based comparison harness in examples/test-bot/. The /testall command runs 26 Bot API methods against both this server and api.telegram.org simultaneously and compares every top-level field:

bash
# Start the server, then run the comparison bot
BOT_TOKEN=<token> bun run examples/test-bot/index.ts
# Send /testall to the bot in Telegram

Result: 26/26 methods produce identical top-level field sets between this server and the official Bot API. file_id / file_unique_id values are byte-for-byte identical (see File Handling).

Schema certification ​

Method parity is continuously certified against the official Bot API reference. The schema/ toolchain scrapes core.telegram.org/bots/api into machine-readable JSON (methods.json, types.json), then a validate command cross-checks every official method against the handlers registered in internal/client:

bash
go run ./schema/cmd/validate     # schema vs implementation parity (exit 1 on gaps)
./schema/regen.sh                # scrape + validate + generate reports

Result: 180/180 official methods registered (100%). The generated schema/COVERAGE.md lists any gaps, deprecated aliases, and the two mtgo-only extensions (close, logout).

Released under the Apache-2.0 License.