Request to use token, but token was unavailable to the client.
32 Replies
- 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!Why are you trying to login a client inside a message event
This doesnt make sense
i do not know
user.rename
isnt a thing
You cant login as other users at allwait
hold
wait
it looks like they are calling
client.login()
outside the event thougham stupid
sen t wrong code
But also inside the event
Which will break it
ah
Because you're logging in with not-a-token
i see now
ok in all honesty i tried gpt clearly doesnt know it
im trying to
make a discord bot
thatll let my friends
change a username
chatgpt is not a good source
Yeah gpt is not for coding
yeah i can tell
8)
i just didnt know djs
you should learn how to code and use the library first
They can change their own username, bots dont change people's usernames
im sorry lol
yeah but like in a game?
like i have a client.js which is used for api endpoints in a game
and it has a set nickname thing
whats that got to do with discord
but i wanna make a bot thatll do the set nickname thing
but as a command
so my friends can use it
sorry if im not explaining it well my english isnt the best kek
change their nickname in a game via discord bot
yes
Or in Discord?
da
game
i have the api endpoints in a client.js
Well that part isnt related, but you can follow our guide on commands
uhh
ok ok hold on let me use a translator
Okay, so basically i would like this:
api has game api endpoint, and login, i want it to do the login, into the api, and then send a request to change the nickname of that account, if you want i can send you the client.js file
does that make senser
all i want is like a thing that sends a request to an api
that is not discord js related
#other-js-ts
but
i want it on the discord bot
accessing an api isn't discord.js related though
if you have a discord.js question yes you can ask that
so i put my support there?
you can make a post in #other-js-ts, this channel is for questions related to discord.js (discord !== discord.js)