sendGift
Send a gift.
Parameters
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.
The parse mode to use for the message.
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,
});