Added the ability to set different bot short descriptions for different user languages using the method \TgBotLib\Bot > setMyShortDescription()
see [setMyShortDescription](https://core.telegram.org/bots/api#setmyshortdescription) for more information.
This commit is contained in:
parent
ccd910938b
commit
8730f82abf
2 changed files with 26 additions and 1 deletions
|
@ -9,8 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Added
|
||||
* Added the ability to set different bot descriptions for different user languages using the method `\TgBotLib\Bot > setMyDescription()`
|
||||
see [setMyDescription](https://core.telegram.org/bots/api#setmydescription) for more information.
|
||||
* Added the ability to get the current bot description in the given language as the class [BotDescription](https://core.telegram.org/bots/api#botdescription)
|
||||
using the method `\TgBotLib\Bot > getMyDescription()`
|
||||
using the method `\TgBotLib\Bot > getMyDescription()` see [getMyDescription](https://core.telegram.org/bots/api#getmydescription) for more information.
|
||||
* Added the ability to set different bot short descriptions for different user languages using the method `\TgBotLib\Bot > setMyShortDescription()`
|
||||
see [setMyShortDescription](https://core.telegram.org/bots/api#setmyshortdescription) for more information.
|
||||
|
||||
### Changed
|
||||
* Removed unused `__destruct()` method from `\TgBotLib\Bot`
|
||||
|
|
|
@ -2173,6 +2173,28 @@
|
|||
], $options)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to change the bot's short description, which is shown on the bot's profile page and is sent
|
||||
* together with the link when users share the bot. Returns True on success.
|
||||
*
|
||||
* @param string|null $short_description New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.
|
||||
* @param string|null $language_code A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.
|
||||
* @param array $options
|
||||
* @return bool
|
||||
* @throws TelegramException
|
||||
* @link https://core.telegram.org/bots/api#setmyshortdescription
|
||||
* @noinspection PhpUnused
|
||||
*/
|
||||
public function setMyShortDescription(?string $short_description=null, ?string $language_code=null, array $options=[]): bool
|
||||
{
|
||||
$this->sendRequest('setMyShortDescription', array_merge([
|
||||
'short_description' => $short_description,
|
||||
'language_code' => $language_code
|
||||
], $options));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to change the bot's menu button in a private chat, or the default menu button.
|
||||
* Returns True on success.
|
||||
|
|
Loading…
Add table
Reference in a new issue