diff --git a/config/default.js b/config/default.js index ecb15733..35819982 100644 --- a/config/default.js +++ b/config/default.js @@ -54,7 +54,9 @@ module.exports.presenceStatusOptions = { module.exports.embedOptions = { info: { fallbackThumbnailUrl: - 'https://raw.githubusercontent.com/mariusbegby/cadence-discord-bot/main/assets/logo-rounded-128px.png' + 'https://raw.githubusercontent.com/mariusbegby/cadence-discord-bot/main/assets/logo-rounded-128px.png', + fallbackIconUrl: + 'https://raw.githubusercontent.com/mariusbegby/cadence-discord-bot/main/assets/discord-profile-icon.png' }, colors: { success: '#23A55A', diff --git a/src/interactions/commands/player/leave.ts b/src/interactions/commands/player/leave.ts index 0c5af313..000520cf 100644 --- a/src/interactions/commands/player/leave.ts +++ b/src/interactions/commands/player/leave.ts @@ -61,7 +61,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the **\`/play\`** command!` diff --git a/src/interactions/commands/player/loop.ts b/src/interactions/commands/player/loop.ts index 287200a3..419aecd7 100644 --- a/src/interactions/commands/player/loop.ts +++ b/src/interactions/commands/player/loop.ts @@ -139,7 +139,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Loop mode disabled**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${currentModeUserString} will no longer play on repeat!` @@ -158,7 +158,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.autoplaying} Loop mode changed**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nWhen the queue is empty, similar tracks will start playing!` @@ -176,7 +176,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.looping} Loop mode changed**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${modeUserString} will now play on repeat!` diff --git a/src/interactions/commands/player/nowplaying.ts b/src/interactions/commands/player/nowplaying.ts index 1003e293..133caddc 100644 --- a/src/interactions/commands/player/nowplaying.ts +++ b/src/interactions/commands/player/nowplaying.ts @@ -138,7 +138,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`, - iconURL: interaction.guild!.iconURL() || '' + iconURL: interaction.guild!.iconURL() || embedOptions.info.fallbackIconUrl }) .setDescription( (queue.node.isPaused() diff --git a/src/interactions/commands/player/pause.ts b/src/interactions/commands/player/pause.ts index c850ca92..fcba5200 100644 --- a/src/interactions/commands/player/pause.ts +++ b/src/interactions/commands/player/pause.ts @@ -72,7 +72,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.pauseResumed} ${ diff --git a/src/interactions/commands/player/play.ts b/src/interactions/commands/player/play.ts index dcb01769..dcd599a3 100644 --- a/src/interactions/commands/player/play.ts +++ b/src/interactions/commands/player/play.ts @@ -269,7 +269,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Added playlist to queue**\n**${durationFormat} [${ @@ -301,7 +301,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.audioStartedPlaying} Started playing**\n**${durationFormat} [${ @@ -330,7 +330,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `${embedOptions.icons.success} **Added to queue**\n**${durationFormat} [${track.title}](${ diff --git a/src/interactions/commands/player/queue.ts b/src/interactions/commands/player/queue.ts index 672280d6..4b34a0b1 100644 --- a/src/interactions/commands/player/queue.ts +++ b/src/interactions/commands/player/queue.ts @@ -116,7 +116,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`, - iconURL: interaction.guild!.iconURL() || '' + iconURL: interaction.guild!.iconURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `${repeatModeString}` + `**${embedOptions.icons.queue} Tracks in queue**\n${queueString}` @@ -153,7 +153,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`, - iconURL: interaction.guild!.iconURL() || '' + iconURL: interaction.guild!.iconURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.audioPlaying} Now playing**\n` + diff --git a/src/interactions/commands/player/remove.ts b/src/interactions/commands/player/remove.ts index 5bab22f1..88c0e7d2 100644 --- a/src/interactions/commands/player/remove.ts +++ b/src/interactions/commands/player/remove.ts @@ -92,7 +92,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${ diff --git a/src/interactions/commands/player/seek.ts b/src/interactions/commands/player/seek.ts index 86270a14..c8cba981 100644 --- a/src/interactions/commands/player/seek.ts +++ b/src/interactions/commands/player/seek.ts @@ -173,7 +173,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Seeking to duration**\nSeeking to **\`${durationString}\`** in current track.` diff --git a/src/interactions/commands/player/shuffle.ts b/src/interactions/commands/player/shuffle.ts index 56c0af77..878d1b8c 100644 --- a/src/interactions/commands/player/shuffle.ts +++ b/src/interactions/commands/player/shuffle.ts @@ -60,7 +60,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.shuffled} Shuffled queue tracks**\nThe **${queue.tracks.data.length}** tracks in the queue has been shuffled.\n\nView the new queue order with **\`/queue\`**.` diff --git a/src/interactions/commands/player/skip.ts b/src/interactions/commands/player/skip.ts index 511f8684..b970a607 100644 --- a/src/interactions/commands/player/skip.ts +++ b/src/interactions/commands/player/skip.ts @@ -92,7 +92,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${ @@ -156,7 +156,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${ diff --git a/src/interactions/commands/player/stop.ts b/src/interactions/commands/player/stop.ts index a7971671..32aae072 100644 --- a/src/interactions/commands/player/stop.ts +++ b/src/interactions/commands/player/stop.ts @@ -63,7 +63,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Stopped playing**\nStopped playing audio and cleared the track queue.\n\nTo play more music, use the **\`/play\`** command!` diff --git a/src/interactions/commands/player/volume.ts b/src/interactions/commands/player/volume.ts index 2ebb1894..3a374328 100644 --- a/src/interactions/commands/player/volume.ts +++ b/src/interactions/commands/player/volume.ts @@ -100,7 +100,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.volumeMuted} Audio muted**\nPlayback audio has been muted, because volume was set to **\`${volume}%\`**.` @@ -116,7 +116,7 @@ const command: CustomSlashCommandInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.volumeChanged} Volume changed**\nPlayback volume has been changed to **\`${volume}%\`**.` diff --git a/src/interactions/components/filters-disable-button.ts b/src/interactions/components/filters-disable-button.ts index 8fa45205..191273c1 100644 --- a/src/interactions/components/filters-disable-button.ts +++ b/src/interactions/components/filters-disable-button.ts @@ -56,7 +56,7 @@ const component: CustomComponentInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.` diff --git a/src/interactions/components/nowplaying-skip-button.ts b/src/interactions/components/nowplaying-skip-button.ts index c18cf7dd..935c3538 100644 --- a/src/interactions/components/nowplaying-skip-button.ts +++ b/src/interactions/components/nowplaying-skip-button.ts @@ -104,7 +104,7 @@ const component: CustomComponentInteraction = { new EmbedBuilder() .setAuthor({ name: authorName, - iconURL: interaction.user.avatarURL() || '' + iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl }) .setDescription( `**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${ diff --git a/src/types/configTypes.ts b/src/types/configTypes.ts index 491b10b2..3fe9c178 100644 --- a/src/types/configTypes.ts +++ b/src/types/configTypes.ts @@ -33,6 +33,7 @@ export interface PresenceStatusOptions { export interface EmbedOptions { info: { fallbackThumbnailUrl: string; + fallbackIconUrl: string; }; colors: { success: ColorResolvable;