Multi Guild Error Logs

https://sourceb.in/hmOEpNlIIk i have the schema, interactionCreate event, and set-up command in the sourcebin. it will send to the channel if I use a channel id but not if i use the database. the guild id and channel id are logged in mongo db but i still get the type error
11 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
cyukizzz
cyukizzzOP2y ago
oops sorry
TypeError: Cannot read properties of undefined (reading 'send')
at Object.execute (C:\Users\keekz\OneDrive\Desktop\Yukiko\src\events\interactionCreate.js:35:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
TypeError: Cannot read properties of undefined (reading 'send')
at Object.execute (C:\Users\keekz\OneDrive\Desktop\Yukiko\src\events\interactionCreate.js:35:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
cyukizzz
cyukizzzOP2y ago
yes
module.exports = (client) => {
client.handleEvents = async (eventFiles, path) => {
for (const file of eventFiles) {
const event = require(`../events/${file}`);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args, client));
} else {
client.on(event.name, (...args) => event.execute(...args, client));
}
}
};
}
module.exports = (client) => {
client.handleEvents = async (eventFiles, path) => {
for (const file of eventFiles) {
const event = require(`../events/${file}`);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args, client));
} else {
client.on(event.name, (...args) => event.execute(...args, client));
}
}
};
}
i use the same method as this for my welcome channel and that works fine
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
cyukizzz
cyukizzzOP2y ago
kk omg. i am so sorry lmfao i shouldve noticed that thank you!!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
cyukizzz
cyukizzzOP2y ago
@Jô 🌈 🦄 are you able to help me with another thing related to mongo?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
cyukizzz
cyukizzzOP2y ago
yea i just did thanks
Want results from more Discord servers?
Add your server