get undefined on channelsmanager.fetch(forumChannel) but not on normal channel

Using both v14.6.0-dev and 14.5.0
SOLUTION HERE : https://canary.discord.com/channels/222078108977594368/1023950108770979840/1023953532350627960


when i try to get a forumchannel at the ready event like so :
    client.channels.cache.get("1023939042062123038").threads.create({
            name: 'Food Talk',
            message: {
                content: 'Discuss your favorite food!',
            },
            reason: 'Needed a separate thread for food',
        }).then(t => t.send("test"))

i get an error : cannot read properties of undefined (reading threads)

but when i change the channelID to some "normal text channel" it does its job without any problem


the same error appears in the same way when trying to fetch the channel on messageCreate event :
message.guild.channels.fetch("1017460418677051432", {cache:true, force:true}).then(c => {
        console.log(c)
        c.threads.create({
            name: 'Food Talk',
            message: {
                content: 'Discuss your favorite food!',
            },
            reason: 'Needed a separate thread for food',
        }).then(t => t.send("test"))
    })

same error (c is not defined and returns null on console.log)
same thing, changing the channel if to some normal channel and it works like a charm
Was this page helpful?