mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +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: [
|
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(
|
||||||
@@ -148,7 +150,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(
|
||||||
|
|||||||
+22
-31
@@ -56,36 +56,27 @@ module.exports = {
|
|||||||
// change paused state to opposite of current state
|
// change paused state to opposite of current state
|
||||||
queue.node.setPaused(!queue.node.isPaused());
|
queue.node.setPaused(!queue.node.isPaused());
|
||||||
|
|
||||||
if (queue.node.isPaused()) {
|
return await interaction.editReply({
|
||||||
return await interaction.editReply({
|
embeds: [
|
||||||
embeds: [
|
new EmbedBuilder()
|
||||||
new EmbedBuilder()
|
.setAuthor({
|
||||||
.setAuthor({
|
name:
|
||||||
name: interaction.member.nickname || interaction.user.username,
|
interaction.member.nickname ||
|
||||||
iconURL: interaction.user.avatarURL()
|
interaction.user.username,
|
||||||
})
|
iconURL: interaction.user.avatarURL()
|
||||||
.setDescription(
|
})
|
||||||
`**${embedIcons.pauseResumed} Paused track**\n**${durationFormat} [${queue.currentTrack.title}](${queue.currentTrack.url})**`
|
.setDescription(
|
||||||
)
|
`**${embedIcons.pauseResumed} ${
|
||||||
.setThumbnail(queue.currentTrack.thumbnail)
|
queue.node.isPaused()
|
||||||
.setColor(embedColors.colorSuccess)
|
? 'Paused Track'
|
||||||
]
|
: 'Resumed track'
|
||||||
});
|
}**\n**${durationFormat} [${
|
||||||
} else {
|
queue.currentTrack.title
|
||||||
return await interaction.editReply({
|
}](${queue.currentTrack.url})**`
|
||||||
embeds: [
|
)
|
||||||
new EmbedBuilder()
|
.setThumbnail(queue.currentTrack.thumbnail)
|
||||||
.setAuthor({
|
.setColor(embedColors.colorSuccess)
|
||||||
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)
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
+9
-5
@@ -41,7 +41,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.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)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
@@ -74,7 +76,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.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)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
@@ -92,9 +96,9 @@ module.exports = {
|
|||||||
? ''
|
? ''
|
||||||
: `\`${track.duration}\``;
|
: `\`${track.duration}\``;
|
||||||
|
|
||||||
return `**${pageIndex * 10 + index + 1}.** ${durationFormat} **[${
|
return `**${
|
||||||
track.title
|
pageIndex * 10 + index + 1
|
||||||
}](${track.url})**`;
|
}.** ${durationFormat} **[${track.title}](${track.url})**`;
|
||||||
})
|
})
|
||||||
.join('\n');
|
.join('\n');
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -67,7 +67,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(
|
||||||
|
|||||||
+6
-2
@@ -67,7 +67,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(
|
||||||
@@ -103,7 +105,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