Skip to content

haggardd/craig-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status MIT License

Logo

Craig Bot

A configurable multi-purpose Discord bot named Craig, built for self hosting on small guilds.

Installation

First things first, you'll need to create a bot via the Discord Developer Portal, a guide can be found HERE.

Running Craig

  1. Clone the repo or download it from GitHub and unzip it

    git clone https://github.com/haggardd/craig-bot.git
  2. Publish Craig to a folder

    cd craig-bot
    dotnet publish -o [YOUR-OUTPUT-DIRECTORY]
  3. Create a config.json file within your output directory with its contents reflecting example-config.json and replace 'YOUR BOT TOKEN HERE' with your token

  4. Run Craig from within your output directory

    dotnet CraigBot.Bot.dll

Hosting Craig

There are a number of ways you can host Craig permanently. Personally, I host Craig on a Raspberry Pi 4, which performs great within a small private guild. For this I use screen which allows me to keep Craig running without being SSH'd into the Pi. It's as simple as running the command below and then detaching from that screen session with Ctrl+A D.

screen dotnet CraigBot.Bot.dll

Configuration

Craig can be easily configured to your liking by using your config.json file. See example-config.json or below for an example and brief explanation of the various settings.

{
  "Bot": {
    "Token": "YOUR BOT TOKEN HERE",
    "Prefix": "!",
    "DmHelp": false,
    "MessageReward": 10,
    "StartingBalance": 10000,
    "Currency": "£",
    "MarketUpdateRate": 30
  },
  "ModuleFlags": {
    "Banking": true,
    "Betting": true,
    "Fun": true,
    "Help": true,
    "Image": true,
    "Miscellaneous": true,
    "Moderation": true,
    "Poll": true,
    "Utility": true
  }
}

Bot

  • Token - Your Discord bot's token, this is a requirement for your bot to startup its client
  • Prefix - This will decided what symbol will be used to prefix your commands, i.e. !help, -help, *help, etc...
  • DmHelp - Setting this to true will send the !help command list response to the requester as a DM as opposed to a message in the channel
  • MessageReward - The amount of points/funds rewarded for posting a message, setting it to anything less than 0.01 will result in no rewards
  • StartingBalance - The starting point/fund balance for new or existing users, setting it to anything less than 0.01 will result in a 0 starting balance
  • Currency - The currency symbol you wish to prefix points/funds with, i.e. £10.00, P10.00, $10.00, etc...
  • MarketUpdateRate - The rate (minutes) at which the stock market prices are updated

ModuleFlags

You can easily disable modules by setting these to false. When disabled, the commands associated with these modules will not be accessible to anyone in guild regardless of roles/ownership. You need at least one module enabled to launch Craig.

Built With

License

Distributed under the MIT License. Click HERE to view Craig's license.

About

A Discord bot named Craig, built for self hosting on small guilds 🤖

Topics

Resources

License

Stars

Watchers

Forks

Languages