mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
Updated headings for warnings and embed color
This commit is contained in:
1 parent
662223d2a9
commit
0414905f58
6 files changed
+50
-55
No files matched your search
+4
-4
@@ -17,9 +17,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nYou need to be in a voice channel to use this command.`
|
`**Failed**\nYou need to be in a voice channel to use this command.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -31,9 +31,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nNo tracks are currently playing, and the queue is empty. Use the \`/play\` command to play some music!`
|
`**Failed**\nNo tracks are currently playing, and the queue is empty. Use the \`/play\` command to play some music!`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -13,9 +13,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nYou need to be in a voice channel to use this command.`
|
`**Failed**\nYou need to be in a voice channel to use this command.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -26,14 +26,15 @@ module.exports = {
|
|||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(`**Error**\nThere are no tracks in the queue.`)
|
.setDescription(`**Failed**\nThere are no tracks in the queue.`)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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()) {
|
if (queue.node.isPaused()) {
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
|
|||||||
+30
-36
@@ -19,9 +19,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nYou need to be in a voice channel to use this command.`
|
`**Failed**\nYou need to be in a voice channel to use this command.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -44,41 +44,35 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
const { track } = await player.play(
|
||||||
const { track } = await player.play(
|
interaction.member.voice.channel,
|
||||||
interaction.member.voice.channel,
|
query,
|
||||||
query,
|
{
|
||||||
{
|
requestedBy: interaction.user,
|
||||||
requestedBy: interaction.user,
|
nodeOptions: {
|
||||||
nodeOptions: {
|
leaveOnEmptyCooldown: 60000,
|
||||||
leaveOnEmptyCooldown: 60000,
|
leaveOnEndCooldown: 60000,
|
||||||
leaveOnEndCooldown: 60000,
|
leaveOnStopCooldown: 60000
|
||||||
leaveOnStopCooldown: 60000
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// TODO: Add a check to see if the queue is empty, and if so, add a message to the embed saying that the track is now playing.
|
// TODO: Add a check to see if the queue is empty, and if so, add a message to the embed saying that the track is now playing.
|
||||||
// TODO: YouTube thumbnail not shown? Different url than track.thumbnail?
|
// TODO: YouTube thumbnail not shown? Different url than track.thumbnail?
|
||||||
await interaction.editReply({
|
throw new Error('Not implemented.');
|
||||||
embeds: [
|
await interaction.editReply({
|
||||||
new EmbedBuilder()
|
embeds: [
|
||||||
.setAuthor({
|
new EmbedBuilder()
|
||||||
name: interaction.user.username,
|
.setAuthor({
|
||||||
iconURL: interaction.user.avatarURL()
|
name: interaction.user.username,
|
||||||
})
|
iconURL: interaction.user.avatarURL()
|
||||||
.setDescription(
|
})
|
||||||
`**Added to queue**\n\`[${track.duration}]\` **[${track.title}](${track.url})**`
|
.setDescription(
|
||||||
)
|
`**Added to queue**\n\`[${track.duration}]\` **[${track.title}](${track.url})**`
|
||||||
.setThumbnail(track.thumbnail)
|
)
|
||||||
.setColor(embedColors.colorSuccess)
|
.setThumbnail(track.thumbnail)
|
||||||
]
|
.setColor(embedColors.colorSuccess)
|
||||||
});
|
]
|
||||||
} catch (e) {
|
});
|
||||||
console.log(
|
|
||||||
`Error: Error occured while trying to play track:\n\n${e}`
|
|
||||||
);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
+3
-3
@@ -19,9 +19,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`You need to be in a voice channel to use this command.`
|
`**Failed**\nYou need to be in a voice channel to use this command.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`Invalid page number. There are only a total of \`${totalPages}\` pages of tracks.`
|
`**Error**\nInvalid page number. There are only a total of \`${totalPages}\` pages of tracks.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorError)
|
||||||
]
|
]
|
||||||
|
|||||||
+4
-4
@@ -21,9 +21,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nYou need to be in a voice channel to use this command.`
|
`**Failed**\nYou need to be in a voice channel to use this command.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -34,8 +34,8 @@ module.exports = {
|
|||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(`**Error**\nThere are no tracks in the queue.`)
|
.setDescription(`**Failed**\nThere are no tracks in the queue.`)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -20,9 +20,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nYou need to be in a voice channel to use this command.`
|
`**Failed**\nYou need to be in a voice channel to use this command.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -34,9 +34,9 @@ module.exports = {
|
|||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
`**Error**\nThere are no tracks playing or in the queue.`
|
`**Failed**\nThere are no tracks playing or in the queue.`
|
||||||
)
|
)
|
||||||
.setColor(embedColors.colorError)
|
.setColor(embedColors.colorWarning)
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user