mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 22:16:13 +00:00
Formatting
This commit is contained in:
1 parent
c59fce19c7
commit
1f1c64284c
5 files changed
+46
-41
No files matched your search
+6
-2
@@ -129,7 +129,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -148,7 +150,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+22
-31
@@ -56,36 +56,27 @@ module.exports = {
|
||||
// change paused state to opposite of current state
|
||||
queue.node.setPaused(!queue.node.isPaused());
|
||||
|
||||
if (queue.node.isPaused()) {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.pauseResumed} Paused track**\n**${durationFormat} [${queue.currentTrack.title}](${queue.currentTrack.url})**`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
]
|
||||
});
|
||||
} else {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.pauseResumed} Resumed track**\n**${durationFormat} [${queue.currentTrack.title}](${queue.currentTrack.url})**`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
]
|
||||
});
|
||||
}
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.pauseResumed} ${
|
||||
queue.node.isPaused()
|
||||
? 'Paused Track'
|
||||
: 'Resumed track'
|
||||
}**\n**${durationFormat} [${
|
||||
queue.currentTrack.title
|
||||
}](${queue.currentTrack.url})**`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
]
|
||||
});
|
||||
}
|
||||
};
|
||||
+9
-5
@@ -41,7 +41,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nPage \`${pageIndex + 1}\` is not a valid page number.\n\nThe queue is currently empty, first add some tracks with \`/play\`!`
|
||||
`**${embedIcons.warning} Oops!**\nPage \`${
|
||||
pageIndex + 1
|
||||
}\` is not a valid page number.\n\nThe queue is currently empty, first add some tracks with \`/play\`!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
]
|
||||
@@ -74,7 +76,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nPage \`${pageIndex + 1}\` is not a valid page number.\n\nThere are only a total of \`${totalPages}\` pages in the queue.`
|
||||
`**${embedIcons.warning} Oops!**\nPage \`${
|
||||
pageIndex + 1
|
||||
}\` is not a valid page number.\n\nThere are only a total of \`${totalPages}\` pages in the queue.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
]
|
||||
@@ -92,9 +96,9 @@ module.exports = {
|
||||
? ''
|
||||
: `\`${track.duration}\``;
|
||||
|
||||
return `**${pageIndex * 10 + index + 1}.** ${durationFormat} **[${
|
||||
track.title
|
||||
}](${track.url})**`;
|
||||
return `**${
|
||||
pageIndex * 10 + index + 1
|
||||
}.** ${durationFormat} **[${track.title}](${track.url})**`;
|
||||
})
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
+3
-1
@@ -67,7 +67,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+6
-2
@@ -67,7 +67,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -103,7 +105,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
Reference in new issue
Block a user