Token problem

Everytime I start the bot it tells me that my token is invalid but it's not
32 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
Fisch
Fisch6mo ago
What do you mean Everything should be good
treble/luna
treble/luna6mo ago
your error disagrees log whatever you pass into your login call
Fisch
Fisch6mo ago
The code is right I meant token sorry In the discord development thing
treble/luna
treble/luna6mo ago
you didnt copy the client secret did you?
Fisch
Fisch6mo ago
No The bot token
treble/luna
treble/luna6mo ago
just show your code
Fisch
Fisch6mo ago
I know, I even resetted it
Fisch
Fisch6mo ago
treble/luna
treble/luna6mo ago
that is not v14 code or well v14 combined with what looks like ai code
Fisch
Fisch6mo ago
Shit No I just deleted the token But in between the two ' is the token
treble/luna
treble/luna6mo ago
show the full error
Fisch
Fisch6mo ago
Error [TokenInvalid]: An invalid token was provided. at WebSocketManager.connect (C:\Users\win 10\OneDrive\Desktop\FB\node_modules\discord.js\src\client\websocket\WebSocketManager.js:136:26) at Client.login (C:\Users\win 10\OneDrive\Desktop\FB\node_modules\discord.js\src\client\Client.js:228:21) at Object.<anonymous> (C:\Users\win 10\OneDrive\Desktop\FB\index.js:59:8) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { code: 'TokenInvalid' } Node.js v20.10.0
treble/luna
treble/luna6mo ago
also unrelated but why are you using / as a prefix but not slash commansd, thats an absolute horrible prefix since it will interfere with slash commands show the first few characters of the token (its just your client id decoded as base32 or base64)
Fisch
Fisch6mo ago
It is
treble/luna
treble/luna6mo ago
did you save your code
Fisch
Fisch6mo ago
STRG+S right?
treble/luna
treble/luna6mo ago
i have no clue what strg is supposed to be but if it corresponds to ctrl, yes
Fisch
Fisch6mo ago
CTRL Sorry Got him online But the command doesn't work somehow
treble/luna
treble/luna6mo ago
so your code wasnt saved?
Fisch
Fisch6mo ago
No Even though I did CTRL+S But now he's online Thanks
treble/luna
treble/luna6mo ago
Still this though
Fisch
Fisch6mo ago
You think this is why? Because the command doesn't work somehow It doesn't even show up
treble/luna
treble/luna6mo ago
Thats not a slash command
d.js docs
d.js docs6mo ago
guide Home: What's new read more
treble/luna
treble/luna6mo ago
Follow the guide and dont ask ai
Fisch
Fisch6mo ago
It is
treble/luna
treble/luna6mo ago
It is not
Fisch
Fisch6mo ago
How
treble/luna
treble/luna6mo ago
thats a regular message command
Fisch
Fisch6mo ago
I just can't get the command to work somehow
treble/luna
treble/luna6mo ago
as i said Follow the guide Dont ask ai