#GateGatewayIntentBits undefined when running on discord bot server

1 messages · Page 1 of 1 (latest)

coral patio
#

It works fine when I run it on my PC but when I run it on a pebblehost server it says it's not defined.

require('dotenv').config();
const {Client, GatewayIntentBits, EmbedBuilder } = require('discord.js');

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.MessageContent,
        GatewayIntentBits.GuildMembers,
        GatewayIntentBits.GuildPresences,
    ]
});


client.on('ready', () => {
    console.log(`${client.user.username} is online`);
})


client.login(process.env.TOKEN);
fallen fern
#

add console.log(version) and check the cersion