Skip to content

$cloneEmbed

$cloneEmbed will clone an embed.

Usage

$cloneEmbed[index;messageID;channelID?;returnJSON?]

Parameters

FieldTypeDescriptionRequired
indexstringThe index of the embed to clone.
1. all
2. number
true
messageIDnumberThe ID of the message containing the embed to be cloned.true
channelID?numberThe ID of the channel where the message is located. Defaults to the current channel.false
returnJSON?booleanWhether 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:

1
client.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:

1
client.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
});