Updated code base

This commit is contained in:
2023-11-22 14:01:06 +01:00
parent c8f49ea188
commit 11c904a25f
2 changed files with 23 additions and 15 deletions

View File

@@ -14,11 +14,19 @@ module.exports = {
execute(oldState, newState) {
if (process.env.NODE_ENV === 'dev') return
const channel = guild.channels.cache.get(botLogChannel)
const embedColor = Number(color.replace('#', '0x'))
if (!channel) {
console.log(`[ERROR] Could not find channel used for voice channel join/leave logging.`)
return
}
const oldChannel = oldState.channel
const newChannel = newState.channel
const guild = oldState.guild
const channel = guild.channels.cache.get(botLogChannel)
const embedColor = Number(color.replace('#', '0x'))
if (oldChannel === null && newChannel !== null) {