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
d.js toolkit
d.js toolkit8mo ago
- 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!
kickas__
kickas__OP8mo ago
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
kickas__
kickas__OP8mo ago
SourceBin
Problems with GPT bot
Instantly share your code with the world.
d.js docs
d.js docs8mo ago
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.
client
.on("debug", console.log)
.on("warn", console.log)
client
.on("debug", console.log)
.on("warn", console.log)
- 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
kickas__
kickas__OP8mo ago
@duck I'm confused
duck
duck8mo ago
confused about what?
monbrey
monbrey8mo ago
did you write this bot?
kickas__
kickas__OP8mo ago
No I wrote it But I found a video
kickas__
kickas__OP8mo ago
I added it
duck
duck8mo ago
and provide the full log output relevant to your issue.
kickas__
kickas__OP8mo ago
~/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?
kickas__
kickas__OP8mo ago
SourceBin
Updated console log
Instantly share your code with the world.
kickas__
kickas__OP8mo ago
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
Want results from more Discord servers?
Add your server