Added method \TgBotLib\Bot > setStickerMaskPosition()
to change the mask position of a mask sticker. See [setStickerMaskPosition](https://core.telegram.org/bots/api#setstickermaskposition) for more information.
https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
parent
54fc17b549
commit
fb1a844526
2 changed files with 25 additions and 0 deletions
|
@ -40,6 +40,8 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
|
||||||
See [setStickerEmojiList](https://core.telegram.org/bots/api#setstickeremojilist) for more information.
|
See [setStickerEmojiList](https://core.telegram.org/bots/api#setstickeremojilist) for more information.
|
||||||
* Added method `\TgBotLib\Bot > setStickerKeywords()` to set the list of emojis for a sticker set.
|
* Added method `\TgBotLib\Bot > setStickerKeywords()` to set the list of emojis for a sticker set.
|
||||||
See [setStickerKeywords](https://core.telegram.org/bots/api#setstickerkeywords) for more information.
|
See [setStickerKeywords](https://core.telegram.org/bots/api#setstickerkeywords) for more information.
|
||||||
|
* Added method `\TgBotLib\Bot > setStickerMaskPosition()` to change the mask position of a mask sticker.
|
||||||
|
See [setStickerMaskPosition](https://core.telegram.org/bots/api#setstickermaskposition) for more information.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Removed unused `__destruct()` method from `\TgBotLib\Bot`
|
* Removed unused `__destruct()` method from `\TgBotLib\Bot`
|
||||||
|
|
|
@ -2712,4 +2712,27 @@
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this method to change the mask position of a mask sticker.
|
||||||
|
* The sticker must belong to a sticker set that was created by the bot. Returns True on success.
|
||||||
|
*
|
||||||
|
* @param string $sticker File identifier of the sticker
|
||||||
|
* @param array $mask_position A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.
|
||||||
|
* @param array $options Optional parameters
|
||||||
|
* @return bool
|
||||||
|
* @throws TelegramException
|
||||||
|
* @link https://core.telegram.org/bots/api#setstickermaskposition
|
||||||
|
* @noinspection PhpUnused
|
||||||
|
* @see https://core.telegram.org/bots/api#maskposition
|
||||||
|
*/
|
||||||
|
public function setStickerMaskPosition(string $sticker, array $mask_position, array $options=[]): bool
|
||||||
|
{
|
||||||
|
$this->sendRequest('setStickerMaskPosition', array_merge([
|
||||||
|
'sticker' => $sticker,
|
||||||
|
'mask_position' => $mask_position
|
||||||
|
], $options));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue