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);
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:
No description
19 Replies
d.js toolkit
d.js toolkit8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
no, it's a vps that only i use root access
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
yes, i host other bots but again, i've never had this issue i've used my vps for like a year, never had issues. this problem has only come up after downtime which happened yesterday due to a datacentre outage
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
around 10
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
oh damn this has been an issue since 3am it's now 3pm is there any way to check the ip ban? nothing is coming up when i listen to the ratelimit event
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
oh
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
{ message: '401: Unauthorized', code: 0 } oh wait ummm now everything is working..
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
yeah that's very strange
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
ethan<333
ethan<333OP8mo ago
ah thank you
Zerls
Zerls8mo ago
Is your bot currently being hosted on a public vps like replit? @a
ethan<333
ethan<333OP8mo ago
no, i have my own vps which i rent from a hosting provider dedicated ip root access
Want results from more Discord servers?
Add your server