giftPremiumSubscription

Gift a Telegram Premium subscription. BOT-ONLY

Parameters

userId: ID

The identifier of a user to gift the Telegram Premium subscription to.

The duration of the subscription.

text?: string

A text to attach to the gift.

parseMode?: ParseMode

The parse mode to use. If omitted, the default parse mode will be used.

entities?: MessageEntity[]

The text’s entities.

Result

void

Syntax

// Required parameters only.
await client.giftPremiumSubscription(userId, duration);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.giftPremiumSubscription(userId, duration, {
    text,
    parseMode,
    entities,
});