fix: Updated user messages for /skip command

This commit is contained in:
Marius Begby committed 2023-07-15 02:43:01 +02:00
1 parent bf69d94354
commit 960d553595
1 file changed
+8 -8
+8 -8
View File
@@ -1,7 +1,7 @@
const { SlashCommandBuilder } = require('@discordjs/builders'); const { SlashCommandBuilder } = require('@discordjs/builders');
const { useQueue } = require('discord-player'); const { useQueue } = require('discord-player');
const { EmbedBuilder } = require('discord.js'); const { EmbedBuilder } = require('discord.js');
const { embedColors } = require('../config.json'); const { embedColors, embedIcons } = require('../config.json');
module.exports = { module.exports = {
data: new SlashCommandBuilder() data: new SlashCommandBuilder()
@@ -20,7 +20,7 @@ module.exports = {
embeds: [ embeds: [
new EmbedBuilder() new EmbedBuilder()
.setDescription( .setDescription(
'**Failed**\nYou need to be in a voice channel to use this command.' `**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
) )
.setColor(embedColors.colorWarning) .setColor(embedColors.colorWarning)
] ]
@@ -34,7 +34,7 @@ module.exports = {
embeds: [ embeds: [
new EmbedBuilder() new EmbedBuilder()
.setDescription( .setDescription(
'**Failed**\nThere are no tracks in the queue. Add tracks with `/play`!' `**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with \`/play\`!`
) )
.setColor(embedColors.colorWarning) .setColor(embedColors.colorWarning)
] ]
@@ -49,9 +49,9 @@ module.exports = {
embeds: [ embeds: [
new EmbedBuilder() new EmbedBuilder()
.setDescription( .setDescription(
`**Error**\nThere are \`${queue.tracks.data.length}\` tracks in the queue. You cannot skip to track number \`${skipToTrack}\`.` `**${embedIcons.warning} Oops!**\nThere are only \`${queue.tracks.data.length}\` tracks in the queue. You cannot skip to track \`${skipToTrack}\`.\n\nView tracks added to the queue with \`/queue\`.`
) )
.setColor(embedColors.colorError) .setColor(embedColors.colorWarning)
] ]
}); });
} else { } else {
@@ -71,7 +71,7 @@ module.exports = {
iconURL: interaction.user.avatarURL() iconURL: interaction.user.avatarURL()
}) })
.setDescription( .setDescription(
`**Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**.` `**${embedIcons.skipped} Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**.`
) )
.setThumbnail(skippedTrack.thumbnail) .setThumbnail(skippedTrack.thumbnail)
.setColor(embedColors.colorSuccess) .setColor(embedColors.colorSuccess)
@@ -84,7 +84,7 @@ module.exports = {
embeds: [ embeds: [
new EmbedBuilder() new EmbedBuilder()
.setDescription( .setDescription(
'**Failed**\nThere are no tracks in the queue and nothing currently playing.' `**${embedIcons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with \`/play\`!`
) )
.setColor(embedColors.colorWarning) .setColor(embedColors.colorWarning)
] ]
@@ -107,7 +107,7 @@ module.exports = {
iconURL: interaction.user.avatarURL() iconURL: interaction.user.avatarURL()
}) })
.setDescription( .setDescription(
`**Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**.` `**${embedIcons.skipped} Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**.`
) )
.setThumbnail(skippedTrack.thumbnail) .setThumbnail(skippedTrack.thumbnail)
.setColor(embedColors.colorSuccess) .setColor(embedColors.colorSuccess)