utility.avatar: attempt object cloning

This commit is contained in:
Cynthia Foxwell 2022-04-03 10:45:25 -06:00
parent 11e2e5f33b
commit eb63d86e69

View file

@ -143,7 +143,7 @@ avatar.callback = async function (msg, line) {
`[Normal avatar](${normalUrl})` +
(guild && guildAvatar ? `\n[Guild avatar](${guildUrl})` : "");
const guildEmbed = baseEmbed;
const guildEmbed = {...baseEmbed};
baseEmbed.image = {url: normalUrl};
guildEmbed.image = {url: guildUrl};
@ -187,7 +187,7 @@ avatar.callback = async function (msg, line) {
`[Normal avatar](${normalUrl})` +
(guild && guildAvatar ? `\n[Guild avatar](${guildUrl})` : "");
const guildEmbed = baseEmbed;
const guildEmbed = {...baseEmbed};
baseEmbed.image = {url: normalUrl};
guildEmbed.image = {url: guildUrl};