fix: Add more logging to all commands

This commit is contained in:
Marius Begby committed 2023-07-19 00:44:32 +02:00
1 parent 389e60baad
commit 8ab4cbead2
13 files changed
+106 -7

No files matched your search

+9
View File
@@ -1,3 +1,4 @@
const logger = require('../../services/logger');
const { embedOptions } = require('../../config');
const { notInVoiceChannel } = require('../../utils/validation/voiceChannelValidation');
const { queueDoesNotExist } = require('../../utils/validation/queueValidation');
@@ -32,6 +33,9 @@ module.exports = {
if (!volume && volume !== 0) {
const currentVolume = queue.node.volume;
logger.debug(
`User used command ${interaction.commandName} but no volume was provided, providing info of current volume.`
);
return await interaction.editReply({
embeds: [
new EmbedBuilder()
@@ -44,6 +48,9 @@ module.exports = {
]
});
} else if (volume > 100 || volume < 0) {
logger.debug(
`User used command ${interaction.commandName} but volume was higher than 100% or lower than 0%.`
);
return await interaction.editReply({
embeds: [
new EmbedBuilder()
@@ -57,6 +64,7 @@ module.exports = {
queue.node.setVolume(volume);
if (volume === 0) {
logger.debug(`User used command ${interaction.commandName} and muted volume.`);
return await interaction.editReply({
embeds: [
new EmbedBuilder()
@@ -72,6 +80,7 @@ module.exports = {
});
}
logger.debug(`User used command ${interaction.commandName} and changed volume.`);
return await interaction.editReply({
embeds: [
new EmbedBuilder()