#client token error
82 messages · Page 1 of 1 (latest)
Finding your bot token:
• Visit the application dashboard and select your application
• Navigate to the Bot tab (not General Information, not OAuth2)!
• Click Reset Token and copy token | https://i.imgur.com/c12eP0t.png (image)
Note: Remember to change the token in your application after you reset it
I already put my token in
But its wrong
but still says its invalid
Because it is
it says 'string' is invalid
You've either put it in wrong, arent passing it to login correctly, or didnt copy the right thing
Where does it say that?
Youre just copying internal source code
That doesnt help
Your token is invalid
Or the value you passed to client.login is not your token
do I redo the whole part then?
the 'if (!token || typeof token !== 'string') throw new DiscordjsError(ErrorCodes.TokenInvalid);' part
Once again, stop copying internal discord.js source code
That's just telling you which line errors
That suggests that the value you passed is undefined, or otherwise not a string
alright
im new to coding I might be asking stupid questions but
it doesnt identify client and discord
with discord.js on it
You probably now have syntax errors
For that identifier to be unexpected suggests the line above it doesnt end correctly
that actually looks fine. I have no idea
oh..
youre still doing a fair bit of cropping though. Its possible theres other issues
reset ur token
where the hell did you get all those imports from???
What file are you modifying here?
And yeah you need to reset your token, but at least now I can see why that didnt work - its not a string
Are you modifying discord.js internal files?
lmao don't tell me he is
nah its a discord bot
Really?
are you sure because i see those same exact imports in Client.js of the source code
Yeah exactly
That looks exactly like you've deleted the actual discord.js Client file and replaced it with your own code
no I'm honest I didn't code it actually I just needed help with those errors
Yeah we cant possibly help you
I'm not sure what happened there'
We expect you to know how to code
This is the most wrong attempt I've seen in some time
No I am a complete beginner
Then you arent going to be able to do this
oh
😭 i would suggest reinstalling discord.js first to fix whatever you did to the source
ill surely do lmao after I realise what I messed up
and make sure to reset ur token
yeah I did
I just wanted to show the whole part to Monbrey
But the only thing that I think you can help me with guys
What's up with the token 'string'
..
No dude, we're so far beyond that issue now lol
String
The String object is used to represent and manipulate a sequence of characters.
You need to learn Javascript first
You wont be able to ask the right questions or understand our answers otherwise
i suggest you to learn the basics first, you should have a simple understanding of codeing and whats going on first.
We've all already said that
i know, wasent clear to him tho. now it might be