mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
feat!: Updated configuration and moved config location
This commit is contained in:
1 parent
2d0df79dac
commit
dd4b56ae67
40 files changed
+468
-482
No files matched your search
@@ -1,7 +1,5 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons, botInfo } = require(path.resolve('./config.json'));
|
||||
const { embedOptions, botOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -13,22 +11,22 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedIcons.rule} **List of commands**\n` +
|
||||
`${embedOptions.icons.rule} **List of commands**\n` +
|
||||
'- **`/play` `query`** - Add a track or playlist to the queue by url or search.\n' +
|
||||
'- **`/pause`** - Pause or resume the current track.\n' +
|
||||
'- **`/queue` `[page]`** - Show the list of tracks added to the queue.\n' +
|
||||
'- **`/nowplaying`** - Show information about the track currently playing.\n' +
|
||||
`- **\`/seek\` \`duration\`** - ${embedIcons.new} Seek to a specified duration in the current track.\n` +
|
||||
`- **\`/loop\` \`mode\`** - ${embedIcons.beta} Toggle looping a track, the whole queue or autoplay.\n` +
|
||||
`- **\`/seek\` \`duration\`** - ${embedOptions.icons.new} Seek to a specified duration in the current track.\n` +
|
||||
`- **\`/loop\` \`mode\`** - ${embedOptions.icons.beta} Toggle looping a track, the whole queue or autoplay.\n` +
|
||||
'- **`/filters`** - Toggle various audio filters during playback.\n' +
|
||||
'- **`/volume` `[percentage]`** - Show or set the playback volume for tracks.\n' +
|
||||
'- **`/skip` `[tracknumber]`** - Skip to next or specified track.\n' +
|
||||
'- **`/remove` `tracknumber`** - Remove specified track from the queue.\n' +
|
||||
'- **`/leave`** - Clear the queue and remove the bot from voice channel.\n\n' +
|
||||
`${embedIcons.support} **Support server**\nJoin the support server for help or suggestions: \n**${botInfo.supportServerInviteUrl}**\n\n` +
|
||||
`${embedIcons.bot} **Enjoying ${botInfo.name}?**\nAdd me to another server: \n**[Click me!](${botInfo.botInviteUrl})**`
|
||||
`${embedOptions.icons.support} **Support server**\nJoin the support server for help or suggestions: \n**${botOptions.serverInviteUrl}**\n\n` +
|
||||
`${embedOptions.icons.bot} **Enjoying ${botOptions.name}?**\nAdd me to another server: \n**[Click me!](${botOptions.botInviteUrl})**`
|
||||
)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { embedOptions, ffmpegFilterOptions } = require('../../config');
|
||||
const {
|
||||
SlashCommandBuilder,
|
||||
EmbedBuilder,
|
||||
ActionRowBuilder,
|
||||
StringSelectMenuBuilder,
|
||||
StringSelectMenuOptionBuilder,
|
||||
ActionRowBuilder,
|
||||
ButtonBuilder
|
||||
} = require('discord.js');
|
||||
const { embedColors, embedIcons, filterList, filterThreadAmount } = require(path.resolve('./config.json'));
|
||||
const { useQueue } = require('discord-player');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -21,9 +20,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -35,16 +34,16 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
let filterOptions = [];
|
||||
|
||||
filterList.forEach((filter) => {
|
||||
ffmpegFilterOptions.availableFilters.forEach((filter) => {
|
||||
let isEnabled = false;
|
||||
|
||||
if (queue.filters.ffmpeg.filters.includes(filter.value)) {
|
||||
@@ -75,16 +74,16 @@ module.exports = {
|
||||
.setCustomId('disable-filters')
|
||||
.setLabel('Disable all filters')
|
||||
.setStyle('Secondary')
|
||||
.setEmoji(embedIcons.disable)
|
||||
.setEmoji(embedOptions.icons.disable)
|
||||
);
|
||||
|
||||
const response = await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**Toggle filters** ${embedIcons.beta}\nEnable or disable audio filters for playback from the menu.`
|
||||
`**Toggle filters** ${embedOptions.icons.beta}\nEnable or disable audio filters for playback from the menu.`
|
||||
)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
],
|
||||
components: [filterActionRow, disableFiltersActionRow]
|
||||
});
|
||||
@@ -100,7 +99,7 @@ module.exports = {
|
||||
|
||||
queue.filters.ffmpeg.setInputArgs([
|
||||
'-threads',
|
||||
filterThreadAmount,
|
||||
ffmpegFilterOptions.threadAmount,
|
||||
'-reconnect',
|
||||
'1',
|
||||
'-reconnect_streamed',
|
||||
@@ -124,9 +123,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Disabled filters**\nAll audio filters have been disabled.`
|
||||
`**${embedOptions.icons.success} Disabled filters**\nAll audio filters have been disabled.`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
@@ -143,11 +142,20 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Filters toggled**\nNow using these filters:\n${confirmation.values
|
||||
.map((enabled) => `\`${filterList.find((filter) => enabled == filter.value).label}\``)
|
||||
`**${
|
||||
embedOptions.icons.success
|
||||
} Filters toggled**\nNow using these filters:\n${confirmation.values
|
||||
.map(
|
||||
(enabled) =>
|
||||
`\`${
|
||||
ffmpegFilterOptions.availableFilters.find(
|
||||
(filter) => enabled == filter.value
|
||||
).label
|
||||
}\``
|
||||
)
|
||||
.join(', ')}.`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -17,9 +15,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -31,9 +29,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\n_Hmm.._ It seems I am not in a voice channel!`
|
||||
`**${embedOptions.icons.warning} Oops!**\n_Hmm.._ It seems I am not in a voice channel!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -49,9 +47,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the **\`/play\`** command!`
|
||||
`**${embedOptions.icons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the **\`/play\`** command!`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
+20
-20
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions, botOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons, botInfo } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -27,9 +25,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -41,9 +39,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -66,10 +64,10 @@ module.exports = {
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${
|
||||
currentMode === 3 ? embedIcons.autoplay : embedIcons.loop
|
||||
currentMode === 3 ? embedOptions.icons.autoplay : embedOptions.icons.loop
|
||||
} Current loop mode**\nThe looping mode is currently set to \`${currentModeUserString}\`.`
|
||||
)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -78,8 +76,10 @@ module.exports = {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(`**${embedIcons.warning} Oops!**\nLoop mode is already \`${modeUserString}\`.`)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setDescription(
|
||||
`**${embedOptions.icons.warning} Oops!**\nLoop mode is already \`${modeUserString}\`.`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -91,9 +91,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.error} Uh-oh... Failed to change loop mode!**\nI tried to change the loop mode to \`${modeUserString}\`, but something went wrong.\n\nYou can try to perform the command again.\n\n_If you think this message is incorrect or the issue persists, please submit a bug report in the **[support server](${botInfo.supportServerInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... Failed to change loop mode!**\nI tried to change the loop mode to \`${modeUserString}\`, but something went wrong.\n\nYou can try to perform the command again.\n\n_If you think this message is incorrect or the issue persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedColors.colorError)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -107,9 +107,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Loop mode disabled**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nThe ${currentModeUserString} will no longer play on repeat!`
|
||||
`**${embedOptions.icons.success} Loop mode disabled**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nThe ${currentModeUserString} will no longer play on repeat!`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -123,9 +123,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.autoplaying} Loop mode changed**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nWhen the queue is empty, similar tracks will start playing!`
|
||||
`**${embedOptions.icons.autoplaying} Loop mode changed**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nWhen the queue is empty, similar tracks will start playing!`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -138,9 +138,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.looping} Loop mode changed**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nThe ${modeUserString} will now play on repeat!`
|
||||
`**${embedOptions.icons.looping} Loop mode changed**\nChanging loop mode from \`${currentModeUserString}\` to \`${modeUserString}\`.\n\nThe ${modeUserString} will now play on repeat!`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions, playerOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons, progressBarOptions } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -15,9 +13,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -29,9 +27,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -41,9 +39,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -57,11 +55,11 @@ module.exports = {
|
||||
]);
|
||||
|
||||
const sourceIcons = new Map([
|
||||
['youtube', embedIcons.sourceYouTube],
|
||||
['soundcloud', embedIcons.sourceSoundCloud],
|
||||
['spotify', embedIcons.sourceSpotify],
|
||||
['apple_music', embedIcons.sourceAppleMusic],
|
||||
['arbitrary', embedIcons.sourceArbitrary]
|
||||
['youtube', embedOptions.icons.sourceYouTube],
|
||||
['soundcloud', embedOptions.icons.sourceSoundCloud],
|
||||
['spotify', embedOptions.icons.sourceSpotify],
|
||||
['apple_music', embedOptions.icons.sourceAppleMusic],
|
||||
['arbitrary', embedOptions.icons.sourceArbitrary]
|
||||
]);
|
||||
|
||||
const currentTrack = queue.currentTrack;
|
||||
@@ -88,11 +86,11 @@ module.exports = {
|
||||
const timestamp = queue.node.getTimestamp();
|
||||
let bar = `**\`${timestamp.current.label}\`** ${queue.node.createProgressBar({
|
||||
queue: false,
|
||||
length: progressBarOptions.length ?? 12,
|
||||
timecodes: progressBarOptions.timecodes ?? false,
|
||||
indicator: progressBarOptions.indicator ?? '🔘',
|
||||
leftChar: progressBarOptions.leftChar ?? '▬',
|
||||
rightChar: progressBarOptions.rightChar ?? '▬'
|
||||
length: playerOptions.progressBar.length ?? 12,
|
||||
timecodes: playerOptions.progressBar.timecodes ?? false,
|
||||
indicator: playerOptions.progressBar.indicator ?? '🔘',
|
||||
leftChar: playerOptions.progressBar.leftChar ?? '▬',
|
||||
rightChar: playerOptions.progressBar.rightChar ?? '▬'
|
||||
})} **\`${timestamp.total.label}\`**`;
|
||||
|
||||
if (currentTrack.raw.duration === 0 || currentTrack.duration === '0:00') {
|
||||
@@ -104,7 +102,7 @@ module.exports = {
|
||||
.setCustomId('nowplaying-skip')
|
||||
.setLabel('Skip track')
|
||||
.setStyle('Secondary')
|
||||
.setEmoji(embedIcons.nextTrack)
|
||||
.setEmoji(embedOptions.icons.nextTrack)
|
||||
);
|
||||
|
||||
const loopModesFormatted = new Map([
|
||||
@@ -126,7 +124,7 @@ module.exports = {
|
||||
.setDescription(
|
||||
(queue.node.isPaused()
|
||||
? '**Currently Paused**\n'
|
||||
: `**${embedIcons.audioPlaying} Now Playing**\n`) +
|
||||
: `**${embedOptions.icons.audioPlaying} Now Playing**\n`) +
|
||||
`**[${currentTrack.title}](${currentTrack.url})**` +
|
||||
`\nRequested by: <@${currentTrack.requestedBy.id}>` +
|
||||
`\n ${bar}\n\n` +
|
||||
@@ -134,7 +132,7 @@ module.exports = {
|
||||
queue.repeatMode === 0
|
||||
? ''
|
||||
: `**${
|
||||
queue.repeatMode === 3 ? embedIcons.autoplay : embedIcons.loop
|
||||
queue.repeatMode === 3 ? embedOptions.icons.autoplay : embedOptions.icons.loop
|
||||
} Looping**\nLoop mode is set to ${loopModeUserString}. You can change it with **\`/loop\`**.`
|
||||
}`
|
||||
)
|
||||
@@ -159,7 +157,7 @@ module.exports = {
|
||||
text: queueLength ? `${queueLength} other tracks in the queue...` : ' '
|
||||
})
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
],
|
||||
components: [nowPlayingActionRow]
|
||||
});
|
||||
@@ -179,9 +177,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
@@ -192,9 +190,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThis track has already been skipped or is no longer playing.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThis track has already been skipped or is no longer playing.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
@@ -217,17 +215,19 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${skippedTrack.url})**` +
|
||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${skippedTrack.url})**` +
|
||||
`${
|
||||
queue.repeatMode === 0
|
||||
? ''
|
||||
: `\n\n**${
|
||||
queue.repeatMode === 3 ? embedIcons.autoplaying : embedIcons.looping
|
||||
queue.repeatMode === 3
|
||||
? embedOptions.icons.autoplaying
|
||||
: embedOptions.icons.looping
|
||||
} Looping**\nLoop mode is set to ${repeatModeUserString}. You can change it with **\`/loop\`**.`
|
||||
}`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -15,9 +13,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -29,9 +27,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -41,9 +39,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -64,12 +62,12 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.pauseResumed} ${
|
||||
`**${embedOptions.icons.pauseResumed} ${
|
||||
queue.node.isPaused() ? 'Paused Track' : 'Resumed track'
|
||||
}**\n**${durationFormat} [${queue.currentTrack.title}](${queue.currentTrack.url})**`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
+24
-26
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions, playerOptions, botOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useMainPlayer, useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons, playerOptions, botInfo } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -16,9 +14,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -35,9 +33,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} No track found**\nNo results found for \`${query}\`.\n\nIf you specified a URL, please make sure it is valid and public.`
|
||||
`**${embedOptions.icons.warning} No track found**\nNo results found for \`${query}\`.\n\nIf you specified a URL, please make sure it is valid and public.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -51,9 +49,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Unsupported audio source**\nYouTube live streams are currently not supported. This is due to issues with extracting audio from the livestream.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botInfo.supportServerInviteUrl})**._`
|
||||
`**${embedOptions.icons.warning} Unsupported audio source**\nYouTube live streams are currently not supported. This is due to issues with extracting audio from the livestream.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -81,9 +79,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Cannot retrieve audio for track**\nThis audio source is age restricted and requires login to access. Because of this I cannot retrieve the audio for the track.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botInfo.supportServerInviteUrl})**._`
|
||||
`**${embedOptions.icons.warning} Cannot retrieve audio for track**\nThis audio source is age restricted and requires login to access. Because of this I cannot retrieve the audio for the track.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -98,9 +96,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.error} Uh-oh... Failed to add track!**\nAfter finding a result, I was unable to retrieve audio for the track.\n\nYou can try to perform the command again.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botInfo.supportServerInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... Failed to add track!**\nAfter finding a result, I was unable to retrieve audio for the track.\n\nYou can try to perform the command again.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedColors.colorError)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -110,9 +108,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.error} Uh-oh... Failed to add track!**\nSomething unexpected happened and the operation was cancelled.\n\nYou can try to perform the command again.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botInfo.supportServerInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... Failed to add track!**\nSomething unexpected happened and the operation was cancelled.\n\nYou can try to perform the command again.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedColors.colorError)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -125,9 +123,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.error} Uh-oh... Failed to add track!**\nThere was an issue adding this track to the queue.\n\nYou can try to perform the command again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botInfo.supportServerInviteUrl})**._`
|
||||
`**${embedOptions.icons.error} Uh-oh... Failed to add track!**\nThere was an issue adding this track to the queue.\n\nYou can try to perform the command again.\n\n_If this problem persists, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._`
|
||||
)
|
||||
.setColor(embedColors.colorError)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -148,14 +146,14 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Added playlist to queue**\n**${durationFormat} [${track.title}](${
|
||||
track.url
|
||||
})**\n\nAnd **${
|
||||
`**${embedOptions.icons.success} Added playlist to queue**\n**${durationFormat} [${
|
||||
track.title
|
||||
}](${track.url})**\n\nAnd **${
|
||||
searchResult.tracks.length - 1
|
||||
}** more tracks... **\`/queue\`** to view all.`
|
||||
)
|
||||
.setThumbnail(track.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -170,10 +168,10 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.audioStartedPlaying} Started playing**\n**${durationFormat} [${track.title}](${track.url})**`
|
||||
`**${embedOptions.icons.audioStartedPlaying} Started playing**\n**${durationFormat} [${track.title}](${track.url})**`
|
||||
)
|
||||
.setThumbnail(track.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -186,10 +184,10 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`${embedIcons.success} **Added to queue**\n**${durationFormat} [${track.title}](${track.url})**`
|
||||
`${embedOptions.icons.success} **Added to queue**\n**${durationFormat} [${track.title}](${track.url})**`
|
||||
)
|
||||
.setThumbnail(track.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions, playerOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons, progressBarOptions } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -16,9 +14,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -33,11 +31,11 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nPage \`${
|
||||
`**${embedOptions.icons.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(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -50,8 +48,8 @@ module.exports = {
|
||||
name: interaction.guild.name,
|
||||
iconURL: interaction.guild.iconURL()
|
||||
})
|
||||
.setDescription(`**${embedIcons.queue} Tracks in queue**\n${queueString}`)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setDescription(`**${embedOptions.icons.queue} Tracks in queue**\n${queueString}`)
|
||||
.setColor(embedOptions.colors.info)
|
||||
.setFooter({
|
||||
text: 'Page 1 of 1'
|
||||
})
|
||||
@@ -66,11 +64,11 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nPage \`${
|
||||
`**${embedOptions.icons.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(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -104,7 +102,7 @@ module.exports = {
|
||||
queue.repeatMode === 0
|
||||
? ''
|
||||
: `**${
|
||||
queue.repeatMode === 3 ? embedIcons.autoplay : embedIcons.loop
|
||||
queue.repeatMode === 3 ? embedOptions.icons.autoplay : embedOptions.icons.loop
|
||||
} Looping**\nLoop mode is set to ${loopModeUserString}. You can change it with **\`/loop\`**.\n\n`
|
||||
}`;
|
||||
|
||||
@@ -117,23 +115,23 @@ module.exports = {
|
||||
iconURL: interaction.guild.iconURL()
|
||||
})
|
||||
.setDescription(
|
||||
`${repeatModeString}` + `**${embedIcons.queue} Tracks in queue**\n${queueString}`
|
||||
`${repeatModeString}` + `**${embedOptions.icons.queue} Tracks in queue**\n${queueString}`
|
||||
)
|
||||
.setFooter({
|
||||
text: `Page ${pageIndex + 1} of ${totalPages}`
|
||||
})
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
});
|
||||
} else {
|
||||
const timestamp = queue.node.getTimestamp();
|
||||
let bar = `**\`${timestamp.current.label}\`** ${queue.node.createProgressBar({
|
||||
queue: false,
|
||||
length: progressBarOptions.length ?? 12,
|
||||
timecodes: progressBarOptions.timecodes ?? false,
|
||||
indicator: progressBarOptions.indicator ?? '🔘',
|
||||
leftChar: progressBarOptions.leftChar ?? '▬',
|
||||
rightChar: progressBarOptions.rightChar ?? '▬'
|
||||
length: playerOptions.progressBar.length ?? 12,
|
||||
timecodes: playerOptions.progressBar.timecodes ?? false,
|
||||
indicator: playerOptions.progressBar.indicator ?? '🔘',
|
||||
leftChar: playerOptions.progressBar.leftChar ?? '▬',
|
||||
rightChar: playerOptions.progressBar.rightChar ?? '▬'
|
||||
})} **\`${timestamp.total.label}\`**`;
|
||||
|
||||
if (currentTrack.raw.duration === 0 || currentTrack.duration === '0:00') {
|
||||
@@ -148,18 +146,18 @@ module.exports = {
|
||||
iconURL: interaction.guild.iconURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.audioPlaying} Now playing**\n` +
|
||||
`**${embedOptions.icons.audioPlaying} Now playing**\n` +
|
||||
(currentTrack ? `**[${currentTrack.title}](${currentTrack.url})**` : 'None') +
|
||||
`\nRequested by: <@${currentTrack.requestedBy.id}>` +
|
||||
`\n ${bar}\n\n` +
|
||||
`${repeatModeString}` +
|
||||
`**${embedIcons.queue} Tracks in queue**\n${queueString}`
|
||||
`**${embedOptions.icons.queue} Tracks in queue**\n${queueString}`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setFooter({
|
||||
text: `Page ${pageIndex + 1} of ${totalPages}`
|
||||
})
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -22,9 +20,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -36,9 +34,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -50,9 +48,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nTrack \`${removeTrackNumber}\` is not a valid track number. There are a total of\`${queue.tracks.data.length}\` tracks in the queue.\n\nView tracks added to the queue with **\`/queue\`**.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nTrack \`${removeTrackNumber}\` is not a valid track number. There are a total of\`${queue.tracks.data.length}\` tracks in the queue.\n\nView tracks added to the queue with **\`/queue\`**.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -70,10 +68,10 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${removedTrack.url})**`
|
||||
`**${embedOptions.icons.success} Removed track**\n**${durationFormat} [${removedTrack.title}](${removedTrack.url})**`
|
||||
)
|
||||
.setThumbnail(removedTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
+18
-20
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -21,9 +19,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -35,9 +33,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -47,9 +45,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -73,12 +71,12 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou entered an invalid duration format, \`${durationString}\`.\n\nPlease use the format \`HH:mm:ss\`, \`mm:ss\` or \`ss\`, where \`HH\` is hours, \`mm\` is minutes and \`ss\` is seconds.\n\n**Examples:**\n` +
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou entered an invalid duration format, \`${durationString}\`.\n\nPlease use the format \`HH:mm:ss\`, \`mm:ss\` or \`ss\`, where \`HH\` is hours, \`mm\` is minutes and \`ss\` is seconds.\n\n**Examples:**\n` +
|
||||
'- `/seek` **`1:24:12`** - Seek to 1 hour, 24 minutes and 12 seconds.\n' +
|
||||
'- `/seek` **`3:27`** - Seek to 3 minutes and 27 seconds.\n' +
|
||||
'- `/seek` **`42`** - Seek to 42 seconds.'
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -98,12 +96,12 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou entered an invalid duration format, \`${durationString}\`.\n\nPlease use the format \`HH:mm:ss\`, \`mm:ss\` or \`ss\`, where \`HH\` is hours, \`mm\` is minutes and \`ss\` is seconds.\n\n**Examples:**\n` +
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou entered an invalid duration format, \`${durationString}\`.\n\nPlease use the format \`HH:mm:ss\`, \`mm:ss\` or \`ss\`, where \`HH\` is hours, \`mm\` is minutes and \`ss\` is seconds.\n\n**Examples:**\n` +
|
||||
'- `/seek` **`1:24:12`** - Seek to 1 hour, 24 minutes and 12 seconds.\n' +
|
||||
'- `/seek` **`3:27`** - Seek to 3 minutes and 27 seconds.\n' +
|
||||
'- `/seek` **`42`** - Seek to 42 seconds.'
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -118,12 +116,12 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou entered an invalid duration format, \`${durationString}\`.\n\nPlease use the format \`HH:mm:ss\`, \`mm:ss\` or \`ss\`, where \`HH\` is hours, \`mm\` is minutes and \`ss\` is seconds.\n\n**Examples:**\n` +
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou entered an invalid duration format, \`${durationString}\`.\n\nPlease use the format \`HH:mm:ss\`, \`mm:ss\` or \`ss\`, where \`HH\` is hours, \`mm\` is minutes and \`ss\` is seconds.\n\n**Examples:**\n` +
|
||||
'- `/seek` **`1:24:12`** - Seek to 1 hour, 24 minutes and 12 seconds.\n' +
|
||||
'- `/seek` **`3:27`** - Seek to 3 minutes and 27 seconds.\n' +
|
||||
'- `/seek` **`42`** - Seek to 42 seconds.'
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -136,9 +134,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou entered **\`${durationString}\`**, which is a duration that is longer than the duration for the current track.\n\nPlease try a duration that is less than the duration of the track (**\`${queue.currentTrack.duration}\`**).`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou entered **\`${durationString}\`**, which is a duration that is longer than the duration for the current track.\n\nPlease try a duration that is less than the duration of the track (**\`${queue.currentTrack.duration}\`**).`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -152,10 +150,10 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Seeking to duration**\nSeeking to **\`${durationString}\`** in current track.`
|
||||
`**${embedOptions.icons.success} Seeking to duration**\nSeeking to **\`${durationString}\`** in current track.`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
+17
-17
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -18,9 +16,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -32,9 +30,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -47,9 +45,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${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\`**.`
|
||||
`**${embedOptions.icons.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.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
} else {
|
||||
@@ -68,10 +66,10 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${skippedTrack.url})**`
|
||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${skippedTrack.url})**`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -81,9 +79,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere is nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -112,17 +110,19 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${skippedTrack.url})**` +
|
||||
`**${embedOptions.icons.skipped} Skipped track**\n**${durationFormat} [${skippedTrack.title}](${skippedTrack.url})**` +
|
||||
`${
|
||||
queue.repeatMode === 0
|
||||
? ''
|
||||
: `\n\n**${
|
||||
queue.repeatMode === 3 ? embedIcons.autoplaying : embedIcons.looping
|
||||
queue.repeatMode === 3
|
||||
? embedOptions.icons.autoplaying
|
||||
: embedOptions.icons.looping
|
||||
} Looping**\nLoop mode is set to ${loopModeUserString}. You can change it with **\`/loop\`**.`
|
||||
}`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons } = require(path.resolve('./config.json'));
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -22,9 +20,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou need to be in a voice channel to use this command.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -36,9 +34,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
`**${embedOptions.icons.warning} Oops!**\nThere are no tracks in the queue and nothing currently playing. First add some tracks with **\`/play\`**!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -53,10 +51,10 @@ module.exports = {
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${
|
||||
currentVolume === 0 ? embedIcons.volumeIsMuted : embedIcons.volume
|
||||
currentVolume === 0 ? embedOptions.icons.volumeIsMuted : embedOptions.icons.volume
|
||||
} Playback volume**\nThe playback volume is currently set to \`${currentVolume}%\`.`
|
||||
)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
});
|
||||
} else if (volume > 100 || volume < 0) {
|
||||
@@ -64,9 +62,9 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nYou cannot set the volume to \`${volume}\`, please pick a value betwen \`1\`% and \`100\`%.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nYou cannot set the volume to \`${volume}\`, please pick a value betwen \`1\`% and \`100\`%.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
} else {
|
||||
@@ -81,9 +79,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.volumeMuted} Audio muted**\nPlayback audio has been muted, because volume was set to \`${volume}%\`.`
|
||||
`**${embedOptions.icons.volumeMuted} Audio muted**\nPlayback audio has been muted, because volume was set to \`${volume}%\`.`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -96,9 +94,9 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.volumeChanged} Volume changed**\nPlayback volume has been changed to \`${volume}%\`.`
|
||||
`**${embedOptions.icons.volumeChanged} Volume changed**\nPlayback volume has been changed to \`${volume}%\`.`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
.setColor(embedOptions.colors.success)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedColors, embedIcons, systemServerGuildIds } = require(path.resolve('./config.json'));
|
||||
const { embedOptions, systemOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
isSystemCommand: true,
|
||||
@@ -10,14 +8,14 @@ module.exports = {
|
||||
.setDescription('Show list of guilds where bot is added.')
|
||||
.setDMPermission(false),
|
||||
execute: async ({ interaction, client }) => {
|
||||
if (!systemServerGuildIds.includes(interaction.guildId)) {
|
||||
if (!systemOptions.systemGuildIds.includes(interaction.guildId)) {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -37,7 +35,7 @@ module.exports = {
|
||||
const totalMemberCount = client.guilds.cache.reduce((a, b) => a + b.memberCount, 0);
|
||||
|
||||
let embedDescription =
|
||||
`**${embedIcons.bot} ${
|
||||
`**${embedOptions.icons.bot} ${
|
||||
client.guilds.cache.size < 50 ? `Top ${client.guilds.cache.size} guilds` : 'Top 50 guilds'
|
||||
} by member count (${client.guilds.cache.size} total)**\n${guildsList}` +
|
||||
`\n\n**Total members:** \`${totalMemberCount}\``;
|
||||
@@ -47,7 +45,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [new EmbedBuilder().setDescription(embedDescription).setColor(embedColors.colorInfo)]
|
||||
embeds: [new EmbedBuilder().setDescription(embedDescription).setColor(embedOptions.colors.info)]
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,23 +1,21 @@
|
||||
const path = require('node:path');
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const { embedOptions, systemOptions } = require('../../config');
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { useQueue } = require('discord-player');
|
||||
const { embedColors, embedIcons, systemServerGuildIds } = require(path.resolve('./config.json'));
|
||||
const osu = require('node-os-utils');
|
||||
const packageJson = require(path.resolve('./package.json'));
|
||||
const { version, dependencies } = require('../../../package.json');
|
||||
|
||||
module.exports = {
|
||||
isSystemCommand: true,
|
||||
data: new SlashCommandBuilder().setName('status').setDescription('Show bot status.').setDMPermission(false),
|
||||
execute: async ({ interaction, client }) => {
|
||||
if (!systemServerGuildIds.includes(interaction.guildId)) {
|
||||
if (!systemOptions.systemGuildIds.includes(interaction.guildId)) {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
`**${embedOptions.icons.warning} Oops!**\nNo permission to execute this command.\n\nThe command \`${interaction.commandName}\` cannot be executed in this server.`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -32,9 +30,9 @@ module.exports = {
|
||||
const cpuUsage = await osu.cpu.usage();
|
||||
const cpuCores = await osu.cpu.count();
|
||||
const platform = await osu.os.platform();
|
||||
const releaseVersion = packageJson.version;
|
||||
const discordJsVersion = packageJson.dependencies['discord.js'];
|
||||
const discordPlayerVersion = packageJson.dependencies['discord-player'];
|
||||
const releaseVersion = version;
|
||||
const discordJsVersion = dependencies['discord.js'];
|
||||
const discordPlayerVersion = dependencies['discord-player'];
|
||||
const discordApiLatency = client.ws.ping;
|
||||
let activeVoiceConnections = 0;
|
||||
client.guilds.cache.forEach((guild) => {
|
||||
@@ -49,7 +47,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.bot} System and bot status**\n` +
|
||||
`**${embedOptions.icons.bot} System and bot status**\n` +
|
||||
`Uptime: \`${uptimeString}\`\n` +
|
||||
`Platform: \`${platform}\`\n` +
|
||||
`CPU cores: \`${cpuCores}\`\n` +
|
||||
@@ -65,7 +63,7 @@ module.exports = {
|
||||
`Active voice connections: \`${activeVoiceConnections}\`\n` +
|
||||
`Joined guilds: \`${client.guilds.cache.size}\``
|
||||
)
|
||||
.setColor(embedColors.colorInfo)
|
||||
.setColor(embedOptions.colors.info)
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user