Discord is trolling me !

Hi, I think i'm getting trolled by discord : I'd to reset my bot token, but after i've update it in the code, i'm getting the error that an invalid token has been provided, could someone try to create a new token and try the new one with a bot ? That's really weird, I can provide screens or else but won't be useful, and It was working before in case..
37 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ninhache
NinhacheOP•2y ago
Done bot 😡
Syjalo
Syjalo•2y ago
No, you didn't show your code
Ninhache
NinhacheOP•2y ago
.. facts but not really usefull, the problem isnt from the code 🤓
Syjalo
Syjalo•2y ago
Are you sure?
Ninhache
NinhacheOP•2y ago
Sure lol
Syjalo
Syjalo•2y ago
Show your error
Ninhache
NinhacheOP•2y ago
I can give you my "client.token()" line if u want
Ninhache
NinhacheOP•2y ago
Ninhache
NinhacheOP•2y ago
Dude i've explained all above
Syjalo
Syjalo•2y ago
Yes, show it
Ninhache
NinhacheOP•2y ago
Let me revoke the token before lol
Ninhache
NinhacheOP•2y ago
Ninhache
NinhacheOP•2y ago
Before it was in a config file but i've changed it because may the error come from there I can sure tell you this token is wrong now I'm asking to someone else to try to create a token and try this to know if discord is trolling me or idk, the problem isnt from the code
Syjalo
Syjalo•2y ago
This error can be thrown if you pass the token as a string directly to login. Show how you did it before.
Ninhache
NinhacheOP•2y ago
That's a non sense
Syjalo
Syjalo•2y ago
Do you want help from us? Provide info that we need to help you.
Ninhache
NinhacheOP•2y ago
If u want but string as that shouldnt crash because i'm creating an alias from a config file There's a config.json looking like this :
{
"token":"..."
}
{
"token":"..."
}
I'm importing this file using :
const { token } = require("config.js");
const { token } = require("config.js");
and was using it like :
client.login(token);
client.login(token);
Syjalo
Syjalo•2y ago
Ok, try console.log(token) before login Is it undefined?
Ninhache
NinhacheOP•2y ago
No Sry i was fixing it on my phone Not undefined, it's telling me the new token i've provide
Syjalo
Syjalo•2y ago
And the error also was thrown?
Ninhache
NinhacheOP•2y ago
Yea the same And the help is still not about the code and only create a token and try it
Syjalo
Syjalo•2y ago
You're doing something wrong in your code. That error can be thrown only if you have provided not a string to login.
Ninhache
NinhacheOP•2y ago
Yo dude stop threat me like a noob please, we're talking about an application that was working, wont provide any proof but lmao, i'm not new to js or developpement...
Kinect3000
Kinect3000•2y ago
Are you sure you copied the bot token, not the OAuth secret?
Syjalo
Syjalo•2y ago
You have applied 2 different version tags. You have provided a code, that can't throw the error. We aren't able to help with provided conflicting info. Probably you have changed the source of discord.js or do something in your code that you didn't show.
Ninhache
NinhacheOP•2y ago
Uh wait that's maybe the problem Loool yes The interface on phone fool me Thanks @kinect3000 The error is clear that's not talking about conflicting or else
Syjalo
Syjalo•2y ago
Weird thing. It doesn't check the content.
Kinect3000
Kinect3000•2y ago
Yea Only checks the type (and for empty)
Ninhache
NinhacheOP•2y ago
That's normal to not check
Syjalo
Syjalo•2y ago
But again, providing a random string shouldn't throw the error.
Ninhache
NinhacheOP•2y ago
Btw the string passed as string to login is non sense too, because it's interpreted as a string
Kinect3000
Kinect3000•2y ago
Discord tokens do have a format
Kinect3000
Kinect3000•2y ago
That how I was able to tell you might not be using the bot token
Syjalo
Syjalo•2y ago
Ugh, the error is from websocket manager that use the same error
Ninhache
NinhacheOP•2y ago
Thanks, didnt notice it, i was finding the string a bit short but anyways
Want results from more Discord servers?
Add your server