Needing help with turning a discord bot online.

šŸ™ The bloody video I followed isnt working for me. Needing some help here.
29 Replies
d.js toolkit
d.js toolkit•2y 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.
treble/luna
treble/luna•2y ago
your token is not a valid token
DGBEVENT
DGBEVENTOP•2y ago
but its not I even just changed it rn
treble/luna
treble/luna•2y ago
console.log process.env.BOT_TOKEN and see if it returns the token wait you called your file main.env idk whether that'll work, mine is just .env
DGBEVENT
DGBEVENTOP•2y ago
DGBEVENT
DGBEVENTOP•2y ago
yeah replit wouldnt let me
treble/luna
treble/luna•2y ago
use vscode, not replit to code
DGBEVENT
DGBEVENTOP•2y ago
vs wasnt working as always
treble/luna
treble/luna•2y ago
replit aint either. and what warning does it give on your require('dotenv') there
DGBEVENT
DGBEVENTOP•2y ago
shit program
treble/luna
treble/luna•2y ago
thats not vscode, thats because you dont have node installed
DGBEVENT
DGBEVENTOP•2y ago
so dumb man I thought I could run package.json and everything would install like every other online provider oof surely theres a website or something I can use?
treble/luna
treble/luna•2y ago
no, you have to run npm i just run npm i discord.js dotenv etc etc
DGBEVENT
DGBEVENTOP•2y ago
treble/luna
treble/luna•2y ago
any free or shared hosting can get ip banned or ratelimited at any point so its unreliable
chewie
chewie•2y ago
you have to install nodejs this is pretty basic knowledge
DGBEVENT
DGBEVENTOP•2y ago
boy why doesnt it install from a command npm install?
chewie
chewie•2y ago
why would it npm is part of nodejs no nodejs, no npm
DGBEVENT
DGBEVENTOP•2y ago
everything else can so why not :/
chewie
chewie•2y ago
please get a decent understanding before you continue with making bots #rules 3 #resources
DGBEVENT
DGBEVENTOP•2y ago
oh god this is that guy who makes a big scene calls the mods and gets us both in trouble sighs
treble/luna
treble/luna•2y ago
chewie is a mod
DGBEVENT
DGBEVENTOP•2y ago
fine I'll read through all them
chewie
chewie•2y ago
glad I dont need to call the mods I'm already here mmLol
DGBEVENT
DGBEVENTOP•2y ago
surely you guys got like a tutorial video or something lol
chewie
chewie•2y ago
no, we have a few text guides in #resources for everything else you need to ask google or get help on a general programming server like the ones in #useful-servers
EndergamerMC
EndergamerMC•2y ago
and you need to do config() to load the token iirc
DGBEVENT
DGBEVENTOP•2y ago
got it
Chelsea
Chelsea•2y ago
replit deprecated env files, use their built in secrets feature

Did you find this page helpful?