One of my first discord bots, I know code is awful.
-
Create redirects in Discord Developers portal to following URLs:
http://localhost:4000/auth
http://localhost:4000/dashboard
-
Create
config.json
file inglobal
folder and paste this:{ "database": { "connection": "<MongoDB url>" }, "dashboard": { "port": 4000, "redirectURL": "http://localhost:4000" }, "discord": { "id": "<Discord Client Id>", "token": "<Discord Client Token>", "secret": "<Discord Client Secret>" } }
-
Install modules -
npm i
-
Run using
node index.js