My bot won't start

Code:

require("dotenv").config();

const { Client, GatewayIntentBits, Partials, ActivityType } = require("discord.js");
const { TOKEN } = process.env;

const bot = new Client({
  partials: [Partials.Message, Partials.Channel, Partials.Reaction, Partials.User, Partials.GuildMember],
  intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
  presence: { activities: [{ name: "Avien Restaurant", type: ActivityType.Playing }] }
});

bot
  .on("debug", console.log)
  .on("warn", console.log)
  .rest.on("rateLimited", data => console.log(data));

console.log(TOKEN);

bot.login(TOKEN).then(a => console.log(a)).catch(console.error);


Notes:
  • token logs fine
  • normal fetch requests work
  • a token reset doesn't fix it
  • works fine on my local machine but doesn't work on a vps
  • im on the latest djs version
  • here's the output which just freezes:
image.png
Was this page helpful?