WIP: feat(types): partial Bot API 10.1 support (Rich Messages, Drafts, etc.)#4
WIP: feat(types): partial Bot API 10.1 support (Rich Messages, Drafts, etc.)#4siakinnik wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces rich message structures, live photo support, and guest bot caller fields to the message types, alongside updating sendMessageDraft to support rich messages and making its text parameter optional. The feedback suggests removing a Russian comment, deleting commented-out code blocks, and removing a redundant duplicate entry of MessageEntity.DateTime in the MessageEntity union type.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // /** Optional. For 'date_time' entities, target Unix timestamp */ | ||
| // unix_time?: number; | ||
| // /** Optional. For 'date_time' entities, the format string to display the date/time */ | ||
| // date_time_format?: string; |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Rewrite the Rich Message types against the official Bot API spec, replacing the invented shapes from the initial 10.1 port: - RichText is the union itself (string | RichText[] | RichText*), not a wrapper with text_pieces - Fix discriminators: heading, pre, blockquote, pullquote - Fix fields: RichTextDateTime.unix_time/date_time_format, RichTextTextMention.user, RichTextCustomEmoji.alternative_text, email_address, RichBlockMap.location/zoom/width/height, RichBlockTable.cells, RichBlockDetails.summary/blocks, list items - Received media blocks (animation/audio/photo/video/voice_note/thinking) carry received media objects, not InputMedia - Add missing rich text types (phone_number, bank_card_number, mention, hashtag, cashtag, bot_command, anchor(_link), reference(_link)) - Drop spurious <F> generic from CommonMessage/rich_message; add RichMessageMessage subtype and wire into CommonMessageBundle - Fix reply_to_checklist_task_id regression (string -> number) methods.ts: - Fix sendMessageDraft indentation; remove invented rich_message param; text optional 0-4096 with Thinking placeholder - Add sendRichMessage, sendRichMessageDraft and InputRichMessage Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Draft PR for tracking Bot API 10.1 types implementation. Added core structures for Rich Messages and message streaming.
Todo:
date_timeentity updates (MessageEntity)sendMessageDraftmethodguest_message,answerGuestQuery)