riforik / Rikard-Discord-Bot

RikardDev's Discord Bot
MIT License
1 stars 0 forks source link
RikardDev logo

RikardDev's Discord Bot

Rikard Bot serves as a personal Discord bot that provides custom commands relative to the creators needs. For support look here...

Discord Invite GitHub All Releases GitHub GitHub stars

Add Rikard to your server!

Full command list

v1.3.0 (07/29/2019)

Framework Enhancements:

  • Knex.js added for sql security
  • Joi.js added for user input sanitation
  • Mexp.js added to evaluate math rather than the unsecure eval in vanilla JS
  • Custom schema's for commands interacting heavily based on user input
  • Inherited schema from the index file standardizing user input to string and escaping potentially harmful characters with regex replace. This alone is not a guarantee so a custom schema is build to continue verifying proper user input
  • Uptime command added
  • Ping command added
  • Cloud commands list added
  • Server builder info commands added
  • Math command now uses mexp to ensure that equations are safely calculated and code does not slip past eval methods
  • ConnPool now an option for connecting to a database rather than normal conn

Bug Fixes:

  • Role rewards now work
  • Rank percentage shows accurately from 0 to max
  • Multiple bug fixes from file cleanup and patch

Getting Started

Follow these steps to get your own version of the bot up and running.

Prerequisites

What will you need to install the bot

Node.js Rikard Discord Bot

Installing

Move the Rikard Discord Bot folder to the directory you choose and open that location in a command line/terminal window...

> cd /Rikard-Discord-Bot/

A step by step series of examples that tell you how to get a development env running

After installing node.js enter the following into your terminal at the bot folder location

> npm i

this will automatically do install the dependencies and packages the bot needs to run because of the package.json

After installing find /utils/conn.js as well as /utils/connPool.js and add your live server credentials

Do the same for /token.json, import your Discord developer bot token

These packages come from:

Others included bot not mentioned...

Connecting to your database

Your conn.js file should link to your hosted servers but you still have no database structure.

  1. In conn.js and connPool.js, database: 'your_database_here' is where you want to enter your mySQL database name
  2. Create tables in your database with these values, just import the file into your database and the structure is set

!!beware of sql injections, the security patch sanitizes user input however trusting/using user input is done at your own discretion!!

Starting the Bot

After installing the packages open terminal and...

  1. locate the bot folder and open a terminal window there

    > cd /Rikard-Discord-Bot/
  2. run this command to start the bot

    > npm run start

Your terminal should look like this...

Last login: Mon Feb 18 13:58:53 on ttys000

Rikards-Macbook-Pro:~ Rikard$ cd /Users/Rikard/Documents/RikardDev/Rikard-Discord-Bot

Rikards-Macbook-Pro:Rikard-Discord-Bot Rikard$ npm run start

> Rikard-Discord-Bot@1.0.0 start /Users/Rikard/Documents/RikardDev/Rikard-Discord-Bot

> node index.js

actualized.js loaded!
addrole.js loaded!
avatar.js loaded!
ban.js loaded!
botinfo.js loaded!
cat.js loaded!
clear.js loaded!
doggo.js loaded!
help.js loaded!
kick.js loaded!
removerole.js loaded!
report.js loaded!
say.js loaded!
serverinfo.js loaded!
tempmute.js loaded!
Rikard is online on (x) servers!

Running the tests - r!help

Keep an eye on your terminal and test out the commands in your Discord server. A list of commands can be found by using r!help

Shutting down Rikard

In your terminal window you can press [Control + C] on Windows or Mac (may prompt for Y/N confirmation)

Support

Discord Support Server

This is seriously the best way to contact me, no social media could come close to the efficiency; I will only post this. It is the fastest.

Init

If you are missing or lost the package.json and accommodating files you may have to re-init

npm init

Built With

Contributing

Please read CONTRIBUTING.md for details on using Rikard Discord and the code of conduct, also the process for submitting pull requests to me.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments