It doesn't fetch the channel

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
Was this page helpful?