Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions src/convenience/constants.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;