An invalid token was provided.

I reseted my token and i did put in my config.json
{
"token_secret":""
}
{
"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);
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
No description
No description
No description
3 Replies
d.js toolkit
d.js toolkit6mo 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! - Marked as resolved by OP
tsk.xz
tsk.xzOP6mo ago
I tried placing the token directly into client.login() to see if that works, but it doesnt
tsk.xz
tsk.xzOP6mo ago
Nevermind, i did copy client secret instead of actual bot token
No description
Want results from more Discord servers?
Add your server