#getting - token invalid

25 messages · Page 1 of 1 (latest)

echo leaf
#

Hey there. I'm installing my first bot and getting error. I took token from discord dev portal, in bot tab, of my my app there... What could be wrong? I made new one token, but still same. I removed '', but getting then different error, so i returned back ''. Any help appreciated. Ty

untold anvil
#

• 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.

grave tiger
#

How do you provide the token? Do you pass it as client.login("…") directly or do you use dotenv or a config.json or …?

nocturne basin
#

how do you set the env values?

#

like blue out the token part, just show the name of the variables

ripe tendonBOT
#

Suggestion for @echo leaf:
guide Creating Your Bot: Using environment variables
read more

solar mason
#

follow this

nocturne basin
#

yea that

echo leaf
#

I'm using not mine script. Its quite simple... But i noticed, that script build for 18 version of node.js and i got 16.9... maybe that's reason

#

I'm newbie in js

echo leaf
#

Okie. I used config.json for token.
Getting now another error

#

But there no config.json

#

Ok, seems intent was missing in dev portal. Now i almost started it

#

Now something wrong with wolvesville api?

hasty forge
#

You just havent defined fetch

echo leaf
#

Ehm.... I wish to know what you mean.. that script working fine with others folks... What can be wrong?

hasty forge
#

fetch not defined

#

As in, probably node-fetch

echo leaf
#

I got node.js 16.9 on host and they can't update it currently. I think that fetch thing came in 17 as experimental and in 18 in full....

#

I done install node-fetch

#

Then import fetch from "node-fetch";

#

But got error something like import...

hasty forge
#

This isnt discord.js related