mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
fix: add user in footer on validation warnings
This commit is contained in:
1 parent
6c5615123a
commit
eb26f5ab93
3 files changed
+44
-1
No files matched your search
@@ -37,6 +37,13 @@ export const checkVoicePermissionJoinAndTalk = async ({ interaction, executionId
|
||||
`**${embedOptions.icons.warning} Oops!**\nI do not have permission to play audio in the voice channel <#${channel.id}>.\n\nPlease make sure I have the **\`Connect\`** and **\`Speak\`** permissions in this voice channel.`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text:
|
||||
interaction.member instanceof GuildMember
|
||||
? interaction.member.nickname || interaction.user.username
|
||||
: interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
@@ -85,6 +92,13 @@ export const checkChannelPermissionViewable = async ({ interaction, executionId
|
||||
`**${embedOptions.icons.warning} Oops!**\nI do not have permission to send message replies in the channel <#${channel.id}>.\n\nPlease make sure I have the **\`View Channel\`** permission in this text channel.`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text:
|
||||
interaction.member instanceof GuildMember
|
||||
? interaction.member.nickname || interaction.user.username
|
||||
: interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import config from 'config';
|
||||
import { EmbedBuilder, InteractionType } from 'discord.js';
|
||||
import { EmbedBuilder, GuildMember, InteractionType } from 'discord.js';
|
||||
import { Logger } from 'pino';
|
||||
import { InteractionValidationError } from '../../classes/interactions';
|
||||
import loggerModule from '../../services/logger';
|
||||
@@ -27,6 +27,13 @@ export const checkQueueExists = async ({ interaction, queue, executionId }: Vali
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text:
|
||||
interaction.member instanceof GuildMember
|
||||
? interaction.member.nickname || interaction.user.username
|
||||
: interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
@@ -57,6 +64,13 @@ export const checkQueueCurrentTrack = async ({ interaction, queue, executionId }
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text:
|
||||
interaction.member instanceof GuildMember
|
||||
? interaction.member.nickname || interaction.user.username
|
||||
: interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
@@ -87,6 +101,13 @@ export const checkQueueEmpty = async ({ interaction, queue, executionId }: Valid
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks added to the queue. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text:
|
||||
interaction.member instanceof GuildMember
|
||||
? interaction.member.nickname || interaction.user.username
|
||||
: interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ export const checkInVoiceChannel = async ({ interaction, executionId }: Validato
|
||||
`**${embedOptions.icons.warning} Not in a voice channel**\nYou need to be in a voice channel to perform this action.`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
@@ -65,6 +69,10 @@ export const checkSameVoiceChannel = async ({ interaction, queue, executionId }:
|
||||
`**${embedOptions.icons.warning} Not in same voice channel**\nYou need to be in the same voice channel as me to perform this action.\n\n**Voice channel:** <#${queue.dispatcher.channel.id}>`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
.setFooter({
|
||||
text: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user