Skip to content

GramIO API Reference / @gramio/contexts/dist / StickerAttachment

Class: StickerAttachment

Defined in: contexts/index.d.ts:715

This object represents a sticker.

Extends

Constructors

Constructor

new StickerAttachment(payload): StickerAttachment

Defined in: contexts/index.d.ts:327

Parameters

ParameterType
payloadTelegramSticker

Returns

StickerAttachment

Inherited from

FileAttachment.constructor

Properties

PropertyModifierTypeDescriptionOverridesInherited fromDefined in
attachmentTypepublicAttachmentTypeReturns attachment's type (e.g. 'audio', 'photo')FileAttachment.attachmentType-contexts/index.d.ts:716
payloadprotectedTelegramSticker--FileAttachment.payloadcontexts/index.d.ts:324

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:314

MDN

Returns

string

Inherited from

FileAttachment.[toStringTag]


customEmojiId

Get Signature

get customEmojiId(): string

Defined in: contexts/index.d.ts:744

For custom emoji stickers, unique identifier of the custom emoji

Returns

string


emoji

Get Signature

get emoji(): string

Defined in: contexts/index.d.ts:734

Emoji associated with the sticker

Returns

string


fileId

Get Signature

get fileId(): string

Defined in: contexts/index.d.ts:329

Identifier for this file, which can be used to download or reuse the file

Returns

string

Inherited from

FileAttachment.fileId


fileSize

Get Signature

get fileSize(): number

Defined in: contexts/index.d.ts:748

File size

Returns

number


fileUniqueId

Get Signature

get fileUniqueId(): string

Defined in: contexts/index.d.ts:334

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

FileAttachment.fileUniqueId


height

Get Signature

get height(): number

Defined in: contexts/index.d.ts:726

Sticker height

Returns

number


maskPosition

Get Signature

get maskPosition(): MaskPosition

Defined in: contexts/index.d.ts:742

For mask stickers, the position where the mask should be placed

Returns

MaskPosition


needs_repainting

Get Signature

get needs_repainting(): true

Defined in: contexts/index.d.ts:746

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:740

Premium animation for the sticker, if the sticker is premium

Returns

File


setName

Get Signature

get setName(): string

Defined in: contexts/index.d.ts:736

Name of the sticker set to which the sticker belongs

Returns

string


thumbnail

Get Signature

get thumbnail(): PhotoSize

Defined in: contexts/index.d.ts:732

Sticker thumbnail in the .WEBP or .JPG format

Returns

PhotoSize


type

Get Signature

get type(): TelegramStickerType

Defined in: contexts/index.d.ts:722

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

TelegramStickerType


width

Get Signature

get width(): number

Defined in: contexts/index.d.ts:724

Sticker width

Returns

number

Methods

isAnimated()

isAnimated(): boolean

Defined in: contexts/index.d.ts:728

true, if the sticker is animated

Returns

boolean


isPremium()

isPremium(): this is Require<StickerAttachment, "premiumAnimation">

Defined in: contexts/index.d.ts:738

Is this sticker a premium one?

Returns

this is Require<StickerAttachment, "premiumAnimation">


isVideo()

isVideo(): boolean

Defined in: contexts/index.d.ts:730

true, if the sticker is a video sticker

Returns

boolean