mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
fix: Add more logging to all commands
This commit is contained in:
1 parent
389e60baad
commit
8ab4cbead2
13 files changed
+106
-7
No files matched your search
@@ -1,3 +1,4 @@
|
||||
const logger = require('../../services/logger');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
|
||||
@@ -12,6 +13,9 @@ exports.queueDoesNotExist = async (interaction, queue) => {
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
logger.debug(`User tried to use command ${interaction.commandName} but there was no queue.`);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,6 +33,9 @@ exports.queueNoCurrentTrack = async (interaction, queue) => {
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
logger.debug(`User tried to use command ${interaction.commandName} but there was no current track.`);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ exports.transformQuery = async (query) => {
|
||||
|
||||
// if country-based, transform to normal Spotify url
|
||||
if (isCountryBased) {
|
||||
logger.debug(`Transforming country-based Spotify url to normal Spotify url from query ${query}.`);
|
||||
const trackId = query.match(regex)[2];
|
||||
query = `https://open.spotify.com/track/${trackId}`;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const logger = require('../../services/logger');
|
||||
const { embedOptions } = require('../../config');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
|
||||
@@ -12,6 +13,8 @@ exports.notInVoiceChannel = async (interaction) => {
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
|
||||
logger.debug(`User tried to use command ${interaction.commandName} but was not in a voice channel.`);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user