mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: added configurable fallback icon url for use in embeds
This commit is contained in:
1 parent
e47256a15e
commit
69fff97e38
16 files changed
+25
-22
No files matched your search
+3
-1
@@ -54,7 +54,9 @@ module.exports.presenceStatusOptions = {
|
|||||||
module.exports.embedOptions = {
|
module.exports.embedOptions = {
|
||||||
info: {
|
info: {
|
||||||
fallbackThumbnailUrl:
|
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: {
|
colors: {
|
||||||
success: '#23A55A',
|
success: '#23A55A',
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the **\`/play\`** command!`
|
`**${embedOptions.icons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the **\`/play\`** command!`
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Loop mode disabled**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${currentModeUserString} will no longer play on repeat!`
|
`**${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()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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!`
|
`**${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()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.looping} Loop mode changed**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${modeUserString} will now play on repeat!`
|
`**${embedOptions.icons.looping} Loop mode changed**\nChanging loop mode from **\`${currentModeUserString}\`** to **\`${modeUserString}\`**.\n\nThe ${modeUserString} will now play on repeat!`
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`,
|
name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`,
|
||||||
iconURL: interaction.guild!.iconURL() || ''
|
iconURL: interaction.guild!.iconURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
(queue.node.isPaused()
|
(queue.node.isPaused()
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.pauseResumed} ${
|
`**${embedOptions.icons.pauseResumed} ${
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Added playlist to queue**\n**${durationFormat} [${
|
`**${embedOptions.icons.success} Added playlist to queue**\n**${durationFormat} [${
|
||||||
@@ -301,7 +301,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.audioStartedPlaying} Started playing**\n**${durationFormat} [${
|
`**${embedOptions.icons.audioStartedPlaying} Started playing**\n**${durationFormat} [${
|
||||||
@@ -330,7 +330,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`${embedOptions.icons.success} **Added to queue**\n**${durationFormat} [${track.title}](${
|
`${embedOptions.icons.success} **Added to queue**\n**${durationFormat} [${track.title}](${
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`,
|
name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`,
|
||||||
iconURL: interaction.guild!.iconURL() || ''
|
iconURL: interaction.guild!.iconURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`${repeatModeString}` + `**${embedOptions.icons.queue} Tracks in queue**\n${queueString}`
|
`${repeatModeString}` + `**${embedOptions.icons.queue} Tracks in queue**\n${queueString}`
|
||||||
@@ -153,7 +153,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`,
|
name: `Channel: ${queue.channel!.name} (${queue.channel!.bitrate / 1000}kbps)`,
|
||||||
iconURL: interaction.guild!.iconURL() || ''
|
iconURL: interaction.guild!.iconURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.audioPlaying} Now playing**\n` +
|
`**${embedOptions.icons.audioPlaying} Now playing**\n` +
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${
|
`**${embedOptions.icons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Seeking to duration**\nSeeking to **\`${durationString}\`** in current track.`
|
`**${embedOptions.icons.success} Seeking to duration**\nSeeking to **\`${durationString}\`** in current track.`
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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\`**.`
|
`**${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\`**.`
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${
|
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${
|
||||||
@@ -156,7 +156,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${
|
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Stopped playing**\nStopped playing audio and cleared the track queue.\n\nTo play more music, use the **\`/play\`** command!`
|
`**${embedOptions.icons.success} Stopped playing**\nStopped playing audio and cleared the track queue.\n\nTo play more music, use the **\`/play\`** command!`
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ const command: CustomSlashCommandInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.volumeMuted} Audio muted**\nPlayback audio has been muted, because volume was set to **\`${volume}%\`**.`
|
`**${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()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.volumeChanged} Volume changed**\nPlayback volume has been changed to **\`${volume}%\`**.`
|
`**${embedOptions.icons.volumeChanged} Volume changed**\nPlayback volume has been changed to **\`${volume}%\`**.`
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ const component: CustomComponentInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.`
|
`**${embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.`
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const component: CustomComponentInteraction = {
|
|||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: authorName,
|
name: authorName,
|
||||||
iconURL: interaction.user.avatarURL() || ''
|
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${
|
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export interface PresenceStatusOptions {
|
|||||||
export interface EmbedOptions {
|
export interface EmbedOptions {
|
||||||
info: {
|
info: {
|
||||||
fallbackThumbnailUrl: string;
|
fallbackThumbnailUrl: string;
|
||||||
|
fallbackIconUrl: string;
|
||||||
};
|
};
|
||||||
colors: {
|
colors: {
|
||||||
success: ColorResolvable;
|
success: ColorResolvable;
|
||||||
|
|||||||
Reference in new issue
Block a user