sendAnimation
Send an animation.
Parameters
The chat to send the animation to.
The animation to send.
The duration of the animation in seconds.
The width of the animation file.
The height of the animation file.
The caption to attach.
The caption’s entities.
The parse mode to use for the caption. If not provided, the default parse mode will be used.
A thumbnail to assign. Cannot be a URL.
Whether to mark the media as a spoiler.
The file name to assign if applicable.
The file’s size.
The mime type to assign if applicable.
Size of each upload chunk in bytes.
Upload abort signal.
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 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 a business connection ID to perform the action on. Bot-only.
Result
The sent animation.
Syntax
// Required parameters only.
await client.sendAnimation(chatId, animation);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.sendAnimation(chatId, animation, {
duration,
width,
height,
caption,
captionEntities,
parseMode,
thumbnail,
hasSpoiler,
fileName,
fileSize,
mimeType,
chunkSize,
signal,
disableNotification,
protectContent,
replyTo,
messageThreadId,
sendAs,
effectId,
sendAt,
businessConnectionId,
paidBroadcast,
});