const { EmbedBuilder } = require("discord.js");
module.exports = async (client) => {
console.log("Loaded: Message Logger");
try {
const channel = await client.channels.fetch(1159494066673815562);
} catch(e) {
console.log("Error:");
console.log(String(e.stack).yellow);
}
};```the fetch channel part causes the catch block to print the error `undefined`
#It doesn't fetch the channel
3 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by OP
Why not just do console.log(error)? Your error handlers are meant to make errors more readable, not less