mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
Now embed colors are defined from config
This commit is contained in:
1 parent
5d986a2e6b
commit
e80a28d975
7 files changed
+36
-25
No files matched your search
+6
-3
@@ -1,6 +1,7 @@
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { useMainPlayer, useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors } = require('../config.json');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -8,6 +9,8 @@ module.exports = {
|
||||
.setDescription(
|
||||
'Clear the track queue and remove the bot from voice channel.'
|
||||
),
|
||||
|
||||
// todo, allow command to be executed if bot is only member in voice channel
|
||||
run: async ({ interaction }) => {
|
||||
if (!interaction.member.voice.channel) {
|
||||
return interaction.editReply({
|
||||
@@ -16,7 +19,7 @@ module.exports = {
|
||||
.setDescription(
|
||||
`**Error**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor('#c70057')
|
||||
.setColor(embedColors.colorError)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -30,7 +33,7 @@ module.exports = {
|
||||
.setDescription(
|
||||
`**Error**\nNo tracks are currently playing, and the queue is empty. Use the \`/play\` command to play some music!`
|
||||
)
|
||||
.setColor('#c70057')
|
||||
.setColor(embedColors.colorError)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -44,7 +47,7 @@ module.exports = {
|
||||
.setDescription(
|
||||
`**Leaving**\nCleared the track queue and left voice channel. To play more music, use the \`/play\` command!`
|
||||
)
|
||||
.setColor('#4c73df')
|
||||
.setColor(embedColors.colorSuccess)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user