mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 22:15:37 +00:00
fix: Improved user messages for muted audio in /volume
This commit is contained in:
1 parent
7bc50d6a84
commit
d5eb032543
1 file changed
+14
-4
+14
-4
@@ -45,11 +45,17 @@ module.exports = {
|
|||||||
const volume = interaction.options.getNumber('percentage');
|
const volume = interaction.options.getNumber('percentage');
|
||||||
|
|
||||||
if (!volume && volume !== 0) {
|
if (!volume && volume !== 0) {
|
||||||
|
const currentVolume = queue.node.volume;
|
||||||
|
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedIcons.volume} Playback volume**\nThe playback volume is currently set to \`${queue.node.volume}%\`.`
|
`**${
|
||||||
|
currentVolume === 0
|
||||||
|
? embedIcons.volumeIsMuted
|
||||||
|
: embedIcons.volume
|
||||||
|
} Playback volume**\nThe playback volume is currently set to \`${currentVolume}%\`.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorInfo)
|
.setColor(embedColors.colorInfo)
|
||||||
]
|
]
|
||||||
@@ -72,11 +78,13 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: interaction.member.nickname || interaction.user.username,
|
name:
|
||||||
|
interaction.member.nickname ||
|
||||||
|
interaction.user.username,
|
||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**${embedIcons.volumeChanged} Audio muted**\nPlayback audio has been muted, because volume was set to \`${volume}%\`.`
|
`**${embedIcons.volumeMuted} Audio muted**\nPlayback audio has been muted, because volume was set to \`${volume}%\`.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorSuccess)
|
.setColor(embedColors.colorSuccess)
|
||||||
]
|
]
|
||||||
@@ -87,7 +95,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
name: interaction.member.nickname || interaction.user.username,
|
name:
|
||||||
|
interaction.member.nickname ||
|
||||||
|
interaction.user.username,
|
||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.setDescription(
|
||||||
|
|||||||
Reference in new issue
Block a user