Another problem again with chatgpt bot
I run index.js which I watched a whole video and nothing will pop up in powershell after running it
14 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!PS C:\Users\tthf2> cd C:\Users\tthf2\OneDrive\Desktop\GPT-BOT
PS C:\Users\tthf2\OneDrive\Desktop\GPT-BOT> node index.js
PS C:\Users\tthf2\OneDrive\Desktop\GPT-BOT> node -v
v20.12.1
PS C:\Users\tthf2\OneDrive\Desktop\GPT-BOT> npm list discord.js
[email protected] C:\Users\tthf2\OneDrive\Desktop\GPT-BOT
`-- [email protected]
Doesnt do anything
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
- Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
- If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin@duck I'm confused
confused about what?
did you write this bot?
No
I wrote it
But I found a video
I added it
and provide the full log output relevant to your issue.
~/GPT-3-discord-chatbot$ node index.js
/home/runner/GPT-3-discord-chatbot/node_modules/discord.js/src/client/Client.js:216
if (!token || typeof token !== 'string') throw new DiscordjsError(ErrorCodes.TokenInvalid);
^
Error [TokenInvalid]: An invalid token was provided.
at Client.login (/home/runner/GPT-3-discord-chatbot/node_modules/discord.js/src/client/Client.js:216:52)
at Object.<anonymous> (/home/runner/GPT-3-discord-chatbot/index.js:23:8)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'TokenInvalid'
}
I have the token reset tho
OPENAI_CODE=
BOT_TOKEN=
Is thow its set
Like this?
im confused my bad
its like it doesnt read the env or something
?
I can show I got a new log once I did that
WAIT
was that my whole problem
hang on
I got it
I think I gotta purchase usage tho