$cloneEmbed
$cloneEmbed
will clone an embed.
Usage
$cloneEmbed[index;messageID;channelID?;returnJSON?]
Parameters
Field | Type | Description | Required |
---|---|---|---|
index | string | The index of the embed to clone. 1. all 2. number | true |
messageID | number | The ID of the message containing the embed to be cloned. | true |
channelID? | number | The ID of the channel where the message is located. Defaults to the current channel. | false |
returnJSON? | boolean | Whether to return the embed(s) as raw JSON instead of attaching them. | false |
Example(s)
This will clone the previous embed and edit the title after 15 seconds:
1client.command({2 name: "cloneEmbed",3 code: `4 $title[Bye!]5 $cloneEmbed[all;$get[messageID];$channelID]6
7 $wait[15s]8 $let[messageID;$sendMessage[{newEmbed: {title:Hello!} {description:I'll edit this message in 15 seconds.}};true]]9 `10});
This will return the cloned embed as raw JSON instead of displaying it:
1client.command({2 name: "cloneEmbed",3 code: `4 $cloneEmbed[all;$get[messageID];$channelID;true]5 $let[messageID;$sendMessage[{newEmbed: {title:Data Collected} {description:Storing raw embed JSON.}};true]]6 `7});