sendGift

Send a gift.

Parameters

userId: ID

The identifier of user to send the gift to.

giftId: string

The identifier of the gift to send.

message?: string

A message to send along with the gift.

parseMode?: ParseMode

The parse mode to use for the message.

entities?: MessageEntity[]

The entities of the message.

private?: boolean

If true, only the receiver of the gift will know the name of the sender.

upgrade?: boolean

Whether the gift should be upgraded before sending it.

Result

void

Syntax

// Required parameters only.
await client.sendGift(userId, giftId);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.sendGift(userId, giftId, {
    message,
    parseMode,
    entities,
    private,
    upgrade,
});