Skip to content

Commit 5b70fc8

Browse files
committed
Add new chat invite link methods, update readme and changelog
1 parent 6223d60 commit 5b70fc8

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
77
### Notes
88
- [:ledger: View file changes][Unreleased]
99
### Added
10+
- Bot API 5.1 (ChatMember Update types, Improved Invite Links, Voice Chat). (@massadm, @noplanman)
1011
### Changed
1112
### Deprecated
1213
### Removed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
A Telegram Bot based on the official [Telegram Bot API]
99

10-
[![API Version](https://img.shields.io/badge/Bot%20API-5.0%20%28November%202020%29-32a2da.svg)](https://core.telegram.org/bots/api#november-4-2020)
10+
[![API Version](https://img.shields.io/badge/Bot%20API-5.1%20%28March%202021%29-32a2da.svg)](https://core.telegram.org/bots/api#november-4-2020)
1111
[![Join the bot support group on Telegram](https://img.shields.io/badge/telegram-@PHP__Telegram__Bot__Support-64659d.svg)](https://telegram.me/PHP_Telegram_Bot_Support)
1212
[![Donate](https://img.shields.io/badge/%F0%9F%92%99-Donate%20%2F%20Support%20Us-blue.svg)](#donate)
1313

@@ -78,7 +78,7 @@ This Bot aims to provide a platform where one can simply write a bot and have in
7878

7979
The Bot can:
8080
- Retrieve updates with [webhook](#webhook-installation) and [getUpdates](#getupdates-installation) methods.
81-
- Supports all types and methods according to Telegram Bot API 5.0 (November 2020).
81+
- Supports all types and methods according to Telegram Bot API 5.1 (March 2021).
8282
- Supports supergroups.
8383
- Handle commands in chat with other bots.
8484
- Manage Channel from the bot admin interface.
@@ -343,15 +343,15 @@ $telegram->useGetUpdatesWithoutDatabase();
343343

344344
### Types
345345

346-
All types are implemented according to Telegram API 5.0 (November 2020).
346+
All types are implemented according to Telegram API 5.1 (March 2021).
347347

348348
### Inline Query
349349

350-
Full support for inline query according to Telegram API 5.0 (November 2020).
350+
Full support for inline query according to Telegram API 5.1 (March 2021).
351351

352352
### Methods
353353

354-
All methods are implemented according to Telegram API 5.0 (November 2020).
354+
All methods are implemented according to Telegram API 5.1 (March 2021).
355355

356356
#### Send Message
357357

src/Request.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
* @method static ServerResponse setChatAdministratorCustomTitle(array $data) Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
6262
* @method static ServerResponse setChatPermissions(array $data) Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights. Returns True on success.
6363
* @method static ServerResponse exportChatInviteLink(array $data) Use this method to generate a new invite link for a chat. Any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as String on success.
64+
* @method static ServerResponse createChatInviteLink(array $data) Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
65+
* @method static ServerResponse editChatInviteLink(array $data) Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the edited invite link as a ChatInviteLink object.
66+
* @method static ServerResponse revokeChatInviteLink(array $data) Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the revoked invite link as ChatInviteLink object.
6467
* @method static ServerResponse setChatPhoto(array $data) Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
6568
* @method static ServerResponse deleteChatPhoto(array $data) Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
6669
* @method static ServerResponse setChatTitle(array $data) Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
@@ -197,6 +200,9 @@ class Request
197200
'setChatAdministratorCustomTitle',
198201
'setChatPermissions',
199202
'exportChatInviteLink',
203+
'createChatInviteLink',
204+
'editChatInviteLink',
205+
'revokeChatInviteLink',
200206
'setChatPhoto',
201207
'deleteChatPhoto',
202208
'setChatTitle',

0 commit comments

Comments
 (0)