2019-11-16 22:32:05 +02:00
|
|
|
# setStickerPositionInSet
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
2020-04-11 20:15:03 +03:00
|
|
|
Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
|
2019-11-16 22:32:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
|
| - | - | - |
|
|
|
|
|
| `sticker` | `#!python3 str` | File identifier of the sticker |
|
|
|
|
|
| `position` | `#!python3 int` | New sticker position in the set, zero-based |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
|
|
Type: `#!python3 bool`
|
|
|
|
|
|
|
|
|
|
Description: Returns True on success.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2020-04-11 20:15:03 +03:00
|
|
|
### As bot method
|
2019-11-16 22:32:05 +02:00
|
|
|
|
|
|
|
|
```python3
|
|
|
|
|
result: bool = await bot.set_sticker_position_in_set(...)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Method as object
|
|
|
|
|
|
|
|
|
|
Imports:
|
|
|
|
|
|
2019-12-11 16:52:21 +02:00
|
|
|
- `from aiogram.methods import SetStickerPositionInSet`
|
|
|
|
|
- `from aiogram.api.methods import SetStickerPositionInSet`
|
|
|
|
|
- `from aiogram.api.methods.set_sticker_position_in_set import SetStickerPositionInSet`
|
2019-11-16 22:32:05 +02:00
|
|
|
|
2020-01-11 22:59:14 +02:00
|
|
|
#### In handlers with current bot
|
2019-11-16 22:32:05 +02:00
|
|
|
```python3
|
2020-01-11 22:59:14 +02:00
|
|
|
result: bool = await SetStickerPositionInSet(...)
|
2019-11-16 22:32:05 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### With specific bot
|
|
|
|
|
```python3
|
2020-01-11 22:59:14 +02:00
|
|
|
result: bool = await bot(SetStickerPositionInSet(...))
|
2019-11-16 22:32:05 +02:00
|
|
|
```
|
2020-01-11 22:59:14 +02:00
|
|
|
#### As reply into Webhook in handler
|
2019-11-16 22:32:05 +02:00
|
|
|
```python3
|
2020-01-11 22:59:14 +02:00
|
|
|
return SetStickerPositionInSet(...)
|
2019-11-16 22:32:05 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Related pages:
|
|
|
|
|
|
|
|
|
|
- [Official documentation](https://core.telegram.org/bots/api#setstickerpositioninset)
|