Skip to content

Add support for member tags and date_time entities and extend permission flags#61

Closed
Sempai-07 wants to merge 1 commit into
mainfrom
codex/update-to-telegram-bot-api-9.5
Closed

Add support for member tags and date_time entities and extend permission flags#61
Sempai-07 wants to merge 1 commit into
mainfrom
codex/update-to-telegram-bot-api-9.5

Conversation

@Sempai-07
Copy link
Copy Markdown
Collaborator

Motivation

  • Expose new Telegram features for member tags and date_time message entities and add missing permission flags so the library can parse and manage these API fields.
  • Keep runtime structures and TypeScript typings consistent with API changes so callers can use new fields and methods safely.

Description

  • Added setChatMemberTag to BaseClient and the corresponding declaration in Methods to allow setting a custom tag for a supergroup member via the API (setChatMemberTag).
  • Extended ChatMember with a tag property, setTag instance method, and equality check to include the tag; updated Message to expose senderTag for channel/reply senders.
  • Added support for the date_time message entity in MessageEntities with dateTime getter, updated search/iterator types and message entity type lists.
  • Introduced new permission flags and mappings: manageTags and editTag (and adjusted index ordering) in ChatPermissions, UserPermissions, and ApiPermissions and updated toApiFormat mapping.
  • Updated user language typing from LanguageCode to string in runtime User and in .d.ts interfaces to match API behavior.
  • Updated various runtime files and .d.ts typings (typings/index.d.ts, typings/telegram/*.d.ts) to reflect all new fields, methods, and types.

Testing

  • No automated tests were executed as part of this change.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77cac6f2ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +197 to +198
manageTags: 15,
manageDirectMessages: 16,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add editTag to user permission flags

ChatMember now reads can_edit_tag, but UserPermissions still does not define editTag in its canonical flag set. Because creator/admin permission snapshots are synthesized from UserPermissions.Flags (for example in ChatMember creator initialization and Chat.memberPermissions(..., checkAdmin=true)), this new right is silently dropped in those flows, so consumers cloning/promoting permissions cannot preserve can_edit_tag.

Useful? React with 👍 / 👎.

@Sempai-07 Sempai-07 closed this Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant