From 7d1151e6cece345d1b8c636e9fe06f4b618545e8 Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 12 Jun 2024 00:30:34 +0200 Subject: [PATCH] Prepare for user applciation --- commands/utility/download.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index c92a7709..7541db9f 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -124,8 +124,14 @@ export default { }; async function download(url, interaction, originalInteraction, format = undefined, description = false) { + let embedColour = 'Navy'; + if (interaction.member) { + if (interaction.member.displayHexColor) { + embedColour = interaction.member.displayHexColor; + } + } const Embed = new EmbedBuilder() - .setColor(interaction.member ? interaction.member.displayHexColor : 'Navy') + .setColor(embedColour) .setAuthor({ name: `Downloaded by ${interaction.user.username}`, iconURL: interaction.user.displayAvatarURL(), url: url }) .setFooter({ text: `You can get the original video by clicking on the "Downloaded by ${interaction.user.username}" message!` });