Ask coding questions

← Back to all posts
Discord Bot Error
IsaacStevens

So I'm trying to make a Discord Bot following a YouTube tutorial (I have no coding experience btw) that showed how to use Scratch and then importing the code here. I followed it step by step but I got these errors:

here is the code: https://replit.com/@IsaacStevens/LoneSpottedPort#bot.js
I am trying to do a basic !ping !pong test and then when I make sure it works I will add other functions. Any advice and/or help is welcome.

Voters
McJoe21
IsaacStevens
Comments
hotnewtop
EpicGamer007
IsaacStevens

@EpicGamer007 I probably sound stupid asking this but what exactly does that mean?

McJoe21

@IsaacStevens it installs the Discord.js node package for the bot api

IsaacStevens

@McJoe21 How do I do it?

EpicGamer007

@IsaacStevens just doing npm i discord.js (i is short for install in npm), will install the latest version of discord.js (which requires nodejs 16.6 or greater), by adding he @12.5.3 at the end, we specify that we want version 12.5.3 of the package.

McJoe21

@EpicGamer007 just use the latest version

EpicGamer007

@McJoe21 the latest version does not work due to replit not supporting node 16.6.0(+)

McJoe21

My bot uses the latest @EpicGamer007

EpicGamer007

@McJoe21 link?