From 843497259121bac2a214ed2922492c15e90f1189 Mon Sep 17 00:00:00 2001 From: KnightNiwrem Date: Sun, 16 Aug 2026 02:04:01 +0800 Subject: [PATCH] fix: use correct options for chat permissions --- src/convenience/constants.ts | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/convenience/constants.ts b/src/convenience/constants.ts index c86ba13c1..6b94a3419 100644 --- a/src/convenience/constants.ts +++ b/src/convenience/constants.ts @@ -1,3 +1,5 @@ +import type { ChatPermissions } from "../types.ts"; + /** * List of update types a bot receives by default. Useful if you want to * receive all update types but `chat_member`, `message_reaction`, and @@ -101,23 +103,24 @@ export const ALL_UPDATE_TYPES = [ * await ctx.restrictAuthor(ALL_CHAT_PERMISSIONS); * ``` * - * See the [Bot API reference](https://core.telegram.org/bots/api#update) + * See the [Bot API reference](https://core.telegram.org/bots/api#chatpermissions) * for more information. */ export const ALL_CHAT_PERMISSIONS = { - is_anonymous: true, - can_manage_chat: true, - can_delete_messages: true, - can_manage_video_chats: true, - can_restrict_members: true, - can_promote_members: true, + can_send_messages: true, + can_send_audios: true, + can_send_documents: true, + can_send_photos: true, + can_send_videos: true, + can_send_video_notes: true, + can_send_voice_notes: true, + can_send_polls: true, + can_send_other_messages: true, + can_add_web_page_previews: true, + can_react_to_messages: true, can_change_info: true, can_invite_users: true, - can_post_stories: true, - can_edit_stories: true, - can_delete_stories: true, - can_post_messages: true, - can_edit_messages: true, + can_edit_tag: true, can_pin_messages: true, can_manage_topics: true, -} as const; +} as const satisfies ChatPermissions;