GramIO API Reference / @gramio/contexts/dist / StickerAttachment
Class: StickerAttachment
Defined in: contexts/index.d.ts:798
This object represents a sticker.
Extends
Constructors
Constructor
new StickerAttachment(
payload):StickerAttachment
Defined in: contexts/index.d.ts:335
Parameters
| Parameter | Type |
|---|---|
payload | TelegramSticker |
Returns
StickerAttachment
Inherited from
Properties
| Property | Modifier | Type | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|---|
attachmentType | public | AttachmentType | Returns attachment's type (e.g. 'audio', 'photo') | FileAttachment.attachmentType | - | contexts/index.d.ts:799 |
payload | protected | TelegramSticker | - | - | FileAttachment.payload | contexts/index.d.ts:332 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:322
Returns
string
Inherited from
customEmojiId
Get Signature
get customEmojiId():
string
Defined in: contexts/index.d.ts:827
For custom emoji stickers, unique identifier of the custom emoji
Returns
string
emoji
Get Signature
get emoji():
string
Defined in: contexts/index.d.ts:817
Emoji associated with the sticker
Returns
string
fileId
Get Signature
get fileId():
string
Defined in: contexts/index.d.ts:337
Identifier for this file, which can be used to download or reuse the file
Returns
string
Inherited from
fileSize
Get Signature
get fileSize():
number
Defined in: contexts/index.d.ts:831
File size
Returns
number
fileUniqueId
Get Signature
get fileUniqueId():
string
Defined in: contexts/index.d.ts:342
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
Returns
string
Inherited from
height
Get Signature
get height():
number
Defined in: contexts/index.d.ts:809
Sticker height
Returns
number
maskPosition
Get Signature
get maskPosition():
MaskPosition
Defined in: contexts/index.d.ts:825
For mask stickers, the position where the mask should be placed
Returns
needs_repainting
Get Signature
get needs_repainting():
true
Defined in: contexts/index.d.ts:829
true, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places
Returns
true
premiumAnimation
Get Signature
get premiumAnimation():
File
Defined in: contexts/index.d.ts:823
Premium animation for the sticker, if the sticker is premium
Returns
setName
Get Signature
get setName():
string
Defined in: contexts/index.d.ts:819
Name of the sticker set to which the sticker belongs
Returns
string
thumbnail
Get Signature
get thumbnail():
PhotoSize
Defined in: contexts/index.d.ts:815
Sticker thumbnail in the .WEBP or .JPG format
Returns
type
Get Signature
get type():
TelegramStickerType
Defined in: contexts/index.d.ts:805
Type of the sticker, currently one of regular, mask, custom_emoji.
The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.
Returns
width
Get Signature
get width():
number
Defined in: contexts/index.d.ts:807
Sticker width
Returns
number
Methods
isAnimated()
isAnimated():
boolean
Defined in: contexts/index.d.ts:811
true, if the sticker is animated
Returns
boolean
isPremium()
isPremium():
this is Require<StickerAttachment, "premiumAnimation">
Defined in: contexts/index.d.ts:821
Is this sticker a premium one?
Returns
this is Require<StickerAttachment, "premiumAnimation">
isVideo()
isVideo():
boolean
Defined in: contexts/index.d.ts:813
true, if the sticker is a video sticker
Returns
boolean