MadelineProto/docs/TD_docs/constructors/sticker.md

52 lines
1.6 KiB
Markdown
Raw Normal View History

---
title: sticker
description: Describes sticker
---
## Constructor: sticker
[Back to constructors index](index.md)
Describes sticker
### Attributes:
| Name | Type | Required | Description |
|----------|:-------------:|:--------:|------------:|
|set\_id|[long](../types/long.md) | Yes|Identifier of sticker set to which the sticker belongs or 0 if none|
|width|[int](../types/int.md) | Yes|Sticker width as defined by sender|
|height|[int](../types/int.md) | Yes|Sticker height as defined by sender|
|emoji|[string](../types/string.md) | Yes|Emoji corresponding to the sticker|
|is\_mask|[Bool](../types/Bool.md) | Yes|True, if the sticker is a mask|
|mask\_position|[maskPosition](../types/maskPosition.md) | Yes|Position where the mask should be placed, nullable|
|thumb|[photoSize](../types/photoSize.md) | Yes|Sticker thumb in webp or jpeg format, nullable|
|sticker|[file](../types/file.md) | Yes|File with sticker|
### Type: [Sticker](../types/Sticker.md)
### Example:
```
2017-07-23 16:33:46 +02:00
$sticker = ['_' => 'sticker', 'set_id' => long, 'width' => int, 'height' => int, 'emoji' => 'string', 'is_mask' => Bool, 'mask_position' => maskPosition, 'thumb' => photoSize, 'sticker' => file];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2017-07-23 16:33:46 +02:00
{"_": "sticker", "set_id": long, "width": int, "height": int, "emoji": "string", "is_mask": Bool, "mask_position": maskPosition, "thumb": photoSize, "sticker": file}
2017-07-23 16:11:02 +02:00
```
Or, if you're into Lua:
```
2017-07-23 16:33:46 +02:00
sticker={_='sticker', set_id=long, width=int, height=int, emoji='string', is_mask=Bool, mask_position=maskPosition, thumb=photoSize, sticker=file}
```