Skip to content

friktiny/discord-bots

Repository files navigation

JS-Discord-Bot

An Open Source version of Cryptonix X and a basic frame for any discord.js bot. Integrates MongoDB as a solution for database! Support Server

Updated for Discord.js V12 woohoo

Made by friktiny#4340

Requirements

Optional tools

  • PM2 - NodeJS Module

How to setup

  1. Make a bot here and grab the token Image_Example1
  2. Fill in the required spots, such as token, prefix and change anything you like in settings.json and customisation.json.
  3. To install all needed node modules, do npm install
  4. Install MongoDB Community Server for coins Database and settings. Tutorial Here
  5. Start the bot by having the cmd/terminal inside the bot folder and type node .
  6. In setup you need to first do [prefix]settings template to get the template. Then you need to edit it and upload it to discord as an attachment with the command [prefix]settings upload
  7. Enjoy!

Common "Errors"

UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token | in JSON at position 69420 - well to solve this compare the json file you're trying to upload to the example.json file included in the code and see whats wrong there.

(OPTIONAL) Keeping your bot online on a virtual private server

Want to start hosting your own bot? Well I have one recommended tool for you

As mentioned in optional tools, PM2 is a useful tool that can help you keep your bot online and restart it whenever it crashes. To install it do npm i pm2 to install it for the repo only or do npm i pm2 -g to install it globally (need admin/sudo perms)

Then you can start the bot using PM2 by doing pm2 start index.js inside the bot folder. More documentation here

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published