diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index bb968c532cd3897..938b82cd488230c 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -925,6 +925,8 @@ declare namespace TelegramBot { login_url?: LoginUrl | undefined; switch_inline_query?: string | undefined; switch_inline_query_current_chat?: string | undefined; + switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat | undefined; + copy_text?: CopyTextButton | undefined; callback_game?: CallbackGame | undefined; pay?: boolean | undefined; } @@ -936,6 +938,18 @@ declare namespace TelegramBot { request_write_access?: boolean | undefined; } + interface SwitchInlineQueryChosenChat { + query: string; + allow_user_chats?: boolean | undefined; + allow_bot_chats?: boolean | undefined; + allow_group_chats?: boolean | undefined; + allow_channel_chats?: boolean | undefined; + } + + interface CopyTextButton { + text: string; + } + interface CallbackQuery { id: string; from: User; @@ -954,17 +968,23 @@ declare namespace TelegramBot { interface ChatPhoto { small_file_id: string; + small_file_unique_id: string; big_file_id: string; + big_file_unique_id: string; } interface ChatInviteLink { invite_link: string; creator: User; + creates_join_request: boolean; is_primary: boolean; is_revoked: boolean; - expire_date?: number; - member_limit?: number; - name?: string; + name?: string | undefined; + expire_date?: number | undefined; + member_limit?: number | undefined; + pending_join_request_count?: number | undefined; + subscription_period?: number | undefined; + subscription_prices?: number | undefined; } interface ChatMember { @@ -995,6 +1015,8 @@ declare namespace TelegramBot { old_chat_member: ChatMember; new_chat_member: ChatMember; invite_link?: ChatInviteLink; + via_join_request?: boolean | undefined; + via_chat_folder_invite_link?: boolean | undefined; } type ChatPermissionsNames = @@ -1532,10 +1554,14 @@ declare namespace TelegramBot { can_promote_members: boolean; can_change_info: boolean; can_invite_users: boolean; + can_post_stories: boolean; + can_edit_stories: boolean; + can_delete_stories: boolean; can_post_messages?: boolean; can_edit_messages?: boolean; can_pin_messages?: boolean; can_manage_topics?: boolean; + can_manage_direct_messages?: boolean; } interface SentWebAppMessage { diff --git a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts index cddb938648ac40f..9786fe650968abd 100644 --- a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts +++ b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts @@ -35,6 +35,20 @@ MyTelegramBot.sendMessage(1234, "test-ForceReply-no-placeholder", { force_reply: true, }, }); +MyTelegramBot.sendMessage(1234, "test-InlineKeyboardButton-CopyTextButton", { + reply_markup: { + inline_keyboard: [ + [ + { + text: `Copy Text`, + copy_text: { + text: "copy text", + }, + }, + ], + ], + }, +}); MyTelegramBot.sendMessage(1234, "test-ReplyKeyboardMarkup-placeholder", { reply_markup: { keyboard: [ @@ -487,6 +501,9 @@ MyTelegramBot.setMyDefaultAdministratorRights({ can_restrict_members: true, can_promote_members: false, can_change_info: true, + can_post_stories: true, + can_edit_stories: true, + can_delete_stories: true, can_invite_users: false, can_post_messages: false, can_pin_messages: true,