Interaction problem

Hello, a strange thing happend to me. I log interaction.channel in interactioncreate event and it's set, then i log it in my command, wich is executed few lines after the first log, and now it's not set anymore

InteractionCreate event:
module.exports = {
    name: Events.InteractionCreate,
    async execute(interaction) {
            if(!interaction.guild) return;
            if(interaction.type === InteractionType.ApplicationCommand){
            
            //some javascript code
    
            console.log("INTERACTION CREATE : " + JSON.stringify(interaction.channel))
         }
}


output:
INTERACTION CREATE : {"type":0,"guild":"1250125877203701841","guildId":"1250125877203701841","permissionOverwrites":["1250125877203701841","1260738028658364551","1260738028062638151","1260738030206189660"],"messages":[],"threads":[],"nsfw":false,"flags":0,"id":"1262593119648747642","name":"🛬・welcome","rawPosition":0,"parentId":"1262593112547659818","topic":null,"lastMessageId":null,"defaultThreadRateLimitPerUser":null,"rateLimitPerUser":0,"createdTimestamp":1721096057570}


auto.js:
module.exports = {

    data: new SlashCommandBuilder()

        .setName('auto')

        .setDescription('automatically create channels'),

    async execute(interaction) {


            //some javascript code

            console.log(JSON.stringify(interaction.channel))

        }
}


output:
null
Was this page helpful?