An invalid token was provided.

I reseted my token and i did put in my config.json
{
    "token_secret":""
}


const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token_secret } = require('./config.json');

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.once(Events.ClientReady, readyClient => {
    console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});

console.log(token_secret)
client.login(token_secret);

My token even appears at my terminal
Node.js v18.19.0
npm version 9.2.0
discord.js 14.15.2
noname.png
noname.png
noname2.png
Was this page helpful?