sendWidget
Send a widget message. BOT-ONLY
Parameters
The identifier of a chat to send the widget message to.
The HTML of the widget.
The width of the widget.
The height of the widget.
The widget’s public data.
The widget’s chat data.
Whether the widget is shared.
Whether the widget is queryable.
The caption to attach.
The caption’s entities.
The parse mode to use for the caption. If omitted, the default parse mode will be used.
Whether to send the message in a silent way without making a sound on the recipients’ clients.
Whether to protect the contents of the message from copying and forwarding.
Information on what the message is replying to.
The identifier of a thread to send the message to.
The identifier of the direct messages topic that is being replied to.
The identifier of a chat to send the message on behalf of. User-only.
The identifier of a message effect to be attached to the message.
If specified, the message will be scheduled to be sent at that date. User-only.
The identifier of the user that will receive the ephemeral message.
The identifier of the callback query that triggered the ephemeral message.
The identifier of a business connection to perform the action on. Bot-only.
Whether the message is a broadcast that is going to be paid for. Bot-only.
The reply markup of the message. Bot-only.
Result
The sent widget message.
Syntax
// Required parameters only.
await client.sendWidget(chatId, html);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.sendWidget(chatId, html, {
width,
height,
publicData,
chatData,
isShared,
isQueryable,
caption,
captionEntities,
parseMode,
isSilent,
isContentProtected,
replyTo,
messageThreadId,
directMessagesTopicId,
sendAs,
effectId,
sendAt,
receiverId,
callbackQueryId,
businessConnectionId,
isPaidBroadcast,
replyMarkup,
});