Check if token valid

How can I check if a token is valid before trying to login? or maybe using the login function if that return a good error idk
4 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
!"Unkown
!"Unkown2y ago
you can just do a request to the discord api at users/@me but if its valid then the bot gonna come online and turn off i mean if u create a privates bots for users and then add there token with a cmd you gonna need it yeah and for that reason the user add their token with a cmd and i encrypt their token so u can save into the db no i dont have it its encrypted …
CC8
CC8OP2y ago
FeelsBadMan thanks @flags64 exactly what i needed
!"Unkown
!"Unkown2y ago
hmm once its encrypted there is no back for decryption you welcome in my case maybe you right is not tos
Want results from more Discord servers?
Add your server