CoreBot Docs

Last updated: January 9, 2020

Installation

Create Your Bot

To create your bot, follow these steps:

  1. Go to https://discordapp.com/developers/applications
  2. Create an application
  3. Copy the ID
  4. Put your bot's ID below
  5. Go to https://discordapp.com/oauth2/authorize?client_id=BOT_ID_HERE&scope=bot&permissions=8 to invite your bot to your server

Getting Verified

To get verified, join our Discord Support Server, click the emoji, and tell our staff your MC-Market username.

Starting your bot

Prerequisites
  • Node.js 10.x.x or later - We recommend LTS
  • A machine that has at least 150mb of RAM - We recommend a VPS or Linux Machine so that your bot is always online
  • A code editor - We recommend Atom or Visual Studio Code
  • A connection to the internet
Pre-Setup
  1. Put your bot token in the Bot_Token section in the config.yml file
  2. Put your bot key in the Bot_Key section in the config.yml file
Windows Setup
  1. Make sure you have Corebot unzipped in a folder
  2. In the folder, shift+right click and press "Open PowerShell Window Here"
  3. Start the bot
    node .
  4. Check that the bot is online on your discord server
Linux Setup

Note: These commands may not work for all Linux distributions. Just open a ticket if you have any questions.

  1. Login to your server through SSH (or open your terminal)
  2. Make sure you have the bot uploaded
  3. Go to your bot's directory
  4. Start the bot with pm2

    npm i pm2 -g
    pm2 start index.js --name corebot
  5. Check that the bot is online on your discord server

Verification System

What's the purpose?

It's very simple, when a user joins they get the unverified role. This role has permissions to only see one channel, which in most cases will be #verify. In the channel there will also be a set verification message with a reaction on it. Once the user reacts with the emoji, they will get the verified or member role. This role is able to see the rest of the guild's channels.

Setup

Preparing your Discord server
  1. Create a channel called #verify (Can be called anything, it doesn't really matter)
  2. Send a verification message. This message should tell users to react with a certain emoji to get verified.
  3. Create a role called Unverified. Set the role to only be able to see the channel you created in step 1. This role also shouldn't have speaking permissions.
  4. Create a Verified or Member role if you don't have one already. Then set this role to see all other channels except the one created in step 1.
Config
  1. Getting the Message ID

    1. Go the message that was sent in part 1
    2. Copy the message's ID to your clipboard. (Note: You will need to enable Discord Developer Mode to do this.)
  2. Open the config.yml and go to the verification section. This should be around lines 350.
  3. Set Enabled to true if you haven't already
  4. Set Verified_Role to the role created in Part 1 (Step 4)
  5. Set Emoji to the emoji you reacted with when creating the message in Part 1 (Step 2). This needs to be the unicode form of the emoji.
  6. Set Message_ID to what you copied to your clipboard in Part 2 (Step 1).
  7. Go to the join event section in the config. This should be around line 45. Set Join_Role to the unverified role created in Part 1 (Step 3).
  8. Save the file and restart the bot! You are now done!

Bot Status

You can set your bot's status by using the setstatus command (-setstatus).

Modules

View

You can view the commands and the status of a module by using module [module name]. Example: -module moderation

Enable

You can enable a module by using module [module name] enable. Example: -module moderation enable

Disable

You can disable a module by using module [module name] disable. Example: -module moderation disable