GramIO API Reference / @gramio/contexts/dist / StickerAttachment
Class: StickerAttachment
Defined in: contexts/index.d.ts:767
This object represents a sticker.
Extends
Constructors
Constructor
new StickerAttachment(
payload):StickerAttachment
Defined in: contexts/index.d.ts:425
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:768 |
payload | protected | TelegramSticker | - | - | FileAttachment.payload | contexts/index.d.ts:422 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:412
Returns
string
Inherited from
customEmojiId
Get Signature
get customEmojiId():
string
Defined in: contexts/index.d.ts:796
For custom emoji stickers, unique identifier of the custom emoji
Returns
string
emoji
Get Signature
get emoji():
string
Defined in: contexts/index.d.ts:786
Emoji associated with the sticker
Returns
string
fileId
Get Signature
get fileId():
string
Defined in: contexts/index.d.ts:427
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:800
File size
Returns
number
fileUniqueId
Get Signature
get fileUniqueId():
string
Defined in: contexts/index.d.ts:432
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:778
Sticker height
Returns
number
maskPosition
Get Signature
get maskPosition():
MaskPosition
Defined in: contexts/index.d.ts:794
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:798
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:792
Premium animation for the sticker, if the sticker is premium
Returns
setName
Get Signature
get setName():
string
Defined in: contexts/index.d.ts:788
Name of the sticker set to which the sticker belongs
Returns
string
thumbnail
Get Signature
get thumbnail():
PhotoSize
Defined in: contexts/index.d.ts:784
Sticker thumbnail in the .WEBP or .JPG format
Returns
type
Get Signature
get type():
TelegramStickerType
Defined in: contexts/index.d.ts:774
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:776
Sticker width
Returns
number
Methods
isAnimated()
isAnimated():
boolean
Defined in: contexts/index.d.ts:780
true, if the sticker is animated
Returns
boolean
isPremium()
isPremium():
this is Require<StickerAttachment, "premiumAnimation">
Defined in: contexts/index.d.ts:790
Is this sticker a premium one?
Returns
this is Require<StickerAttachment, "premiumAnimation">
isVideo()
isVideo():
boolean
Defined in: contexts/index.d.ts:782
true, if the sticker is a video sticker
Returns
boolean