Nitr0h Da Bear
Nitr0h Da Bear
DIAdiscord.js - Imagine an app
Created by Nitr0h Da Bear on 10/12/2023 in #djs-questions
ReferenceError: blacklistLog is not defined
Code Block
const logChannel = client.channels.cache.get('1095093697047183541');
const user = message.author;

blacklistLog = new EmbedBuilder()
.setTitle(`${user.username} said a blacklisted word.`)
.setDescription(`"${message.content}"`)
.setColor('Red');
const logChannel = client.channels.cache.get('1095093697047183541');
const user = message.author;

blacklistLog = new EmbedBuilder()
.setTitle(`${user.username} said a blacklisted word.`)
.setDescription(`"${message.content}"`)
.setColor('Red');
Error
node:events:492
throw er; // Unhandled 'error' event
^

ReferenceError: blacklistLog is not defined
at module.exports (/Users/nitr0h/Developer/BoosterBotJS/src/events/messageCreate/messageCreate.js:43:15)
at Client.<anonymous> (/Users/nitr0h/Developer/BoosterBotJS/node_modules/commandkit/dist/index.js:451:39)
at Client.emit (node:events:514:28)
at MessageCreateAction.handle (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/actions/MessageCreate.js:28:14)
at module.exports [as MESSAGE_CREATE] (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
at WebSocketManager.emit (/Users/nitr0h/Developer/BoosterBotJS/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/Users/nitr0h/Developer/BoosterBotJS/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/Users/nitr0h/Developer/BoosterBotJS/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:397:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

Node.js v20.7.0
[nodemon] app crashed - waiting for file changes before starting...
node:events:492
throw er; // Unhandled 'error' event
^

ReferenceError: blacklistLog is not defined
at module.exports (/Users/nitr0h/Developer/BoosterBotJS/src/events/messageCreate/messageCreate.js:43:15)
at Client.<anonymous> (/Users/nitr0h/Developer/BoosterBotJS/node_modules/commandkit/dist/index.js:451:39)
at Client.emit (node:events:514:28)
at MessageCreateAction.handle (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/actions/MessageCreate.js:28:14)
at module.exports [as MESSAGE_CREATE] (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (/Users/nitr0h/Developer/BoosterBotJS/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
at WebSocketManager.emit (/Users/nitr0h/Developer/BoosterBotJS/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/Users/nitr0h/Developer/BoosterBotJS/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/Users/nitr0h/Developer/BoosterBotJS/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:397:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

Node.js v20.7.0
[nodemon] app crashed - waiting for file changes before starting...
7 replies