From e6938f81ebd5da4486168ebb0dc67b1e48671d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=C3=A9rez=20Fern=C3=A1ndez?= Date: Mon, 26 Apr 2021 18:50:34 +0200 Subject: [PATCH] Telegram Bot API 5.2 Support (#870) * Add new method sendPoll * getMyCommands * setMyCommands * Update doc/api * 1# Fix Test sendPhoto The sendPhoto method does not support .gif files, use sendAnimation. This fix remplace .gif file by .png * CustomTitle and ChatPermissions support setChatAdministratorCustomTitle setChatPermissions * Update Readme Update Badge Telegram API Version * Minor Fix and Fix setChatPhoto The Telegram Bots api has a bug that they are fixing and gives problems with the previous image. While they don't fix it, the image replacement is the fastest solution * Minor Fix and Add Test Fixed setChatPermissions Test: - sendDice - getMyCommands - setMyCommands - setChatAdministratorCustomTitle - setChatPermissions * Update Changelog and Package.json version * Fix typos in Changelog * Add support for poll_answer From: https://github.com/yagop/node-telegram-bot-api/pull/777 * Add JieJiSS contribution in Changelog * Add sendPoll Test * Add unpinAllChatMessages Support * Add copyMessage support * Add close and logOut Support * Add Test + Minor fixes * Update CHANGELOG Update version 0.50.1 * Update Readme Bot API Badge * Update Version to 0.51.0 * Bot API 5.1 support Improved Invite Links - Added the method createChatInviteLink - Added the method editChatInviteLink - Added the method revokeChatInviteLink * Update version to 0.52.0 and new tests - Update Changelog - New Test - Update version to 0.52.0 * Add new messageTypes - voice_chat_started - voice_chat_ended - voice_chat_participants_invited * Update Changelog and add new MessageType * New messageTypes and updates Add support for new messageTypes: - chat_invite_link - chat_member_updated Add support for new updates: - my_chat_member - chat_member * Telegram Bot API 5.2 Support * Update Changelog + readme * Fix Changelog --- CHANGELOG.md | 8 ++++++++ README.md | 3 ++- src/telegram.js | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac3a311..9bb5a2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.52.1][0.52.1] - 2021-04-26 + +Added: + +1. Support Bot API v5.2:(@danielperez9430) + + * Add support for new messageTypes: + * *voice_chat_scheduled* ## [0.52.0][0.52.0] - 2021-03-20 diff --git a/README.md b/README.md index 8cb6d25..0decc37 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ Node.js module to interact with the official [Telegram Bot API](https://core.telegram.org/bots/api). -[![Bot API](https://img.shields.io/badge/Bot%20API-v.5.1-00aced.svg?style=flat-square&logo=telegram)](https://core.telegram.org/bots/api) + +[![Bot API](https://img.shields.io/badge/Bot%20API-v.5.2-00aced.svg?style=flat-square&logo=telegram)](https://core.telegram.org/bots/api) [![npm package](https://img.shields.io/npm/v/node-telegram-bot-api?logo=npm&style=flat-square)](https://www.npmjs.org/package/node-telegram-bot-api) [![Build Status](https://img.shields.io/travis/yagop/node-telegram-bot-api/master?style=flat-square&logo=travis)](https://travis-ci.org/yagop/node-telegram-bot-api) [![Coverage Status](https://img.shields.io/codecov/c/github/yagop/node-telegram-bot-api?style=flat-square&logo=codecov)](https://codecov.io/gh/yagop/node-telegram-bot-api) diff --git a/src/telegram.js b/src/telegram.js index 3063d2c..f91c9a1 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -51,6 +51,7 @@ const _messageTypes = [ 'voice_chat_started', 'voice_chat_ended', 'voice_chat_participants_invited', + 'voice_chat_scheduled', 'message_auto_delete_timer_changed', 'chat_invite_link', 'chat_member_updated' @@ -1015,7 +1016,7 @@ class TelegramBot extends EventEmitter { * Send chat action. * `typing` for text messages, * `upload_photo` for photos, `record_video` or `upload_video` for videos, - * `record_audio` or `upload_audio` for audio files, `upload_document` for general files, + * `record_voice` or `upload_voice` for audio files, `upload_document` for general files, * `find_location` for location data. * * @param {Number|String} chatId Unique identifier for the message recipient