Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Version 4
Home
/
Chat
/
JavaScript
/
Message

Copy a message

Copy link

A user can copy and send their own message in the same channel or to another channel. This works the same way for both open channels and group channels.

User message

Copy link
await channel.copyUserMessage(TARGET_CHANNEL, MESSAGE_TO_COPY);

File message

Copy link
await channel.copyFileMessage(TARGET_CHANNEL, MESSAGE_TO_COPY);

List of arguments

Copy link
ArgumentTypeDescription

TARGET_CHANNEL

object

Specifies a target channel to send a copied message to.

MESSAGE_TO_COPY

object

Specifies a message to copy.