First things first, you'll need to create a bot via the Discord Developer Portal, a guide can be found HERE.
-
Clone the repo or download it from GitHub and unzip it
git clone https://github.com/haggardd/craig-bot.git
-
Publish Craig to a folder
cd craig-bot dotnet publish -o [YOUR-OUTPUT-DIRECTORY]
-
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 -
Run Craig from within your output directory
dotnet CraigBot.Bot.dll
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
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
}
}
Token
- Your Discord bot's token, this is a requirement for your bot to startup its clientPrefix
- This will decided what symbol will be used to prefix your commands, i.e.!help
,-help
,*help
, etc...DmHelp
- Setting this totrue
will send the!help
command list response to the requester as a DM as opposed to a message in the channelMessageReward
- The amount of points/funds rewarded for posting a message, setting it to anything less than0.01
will result in no rewardsStartingBalance
- The starting point/fund balance for new or existing users, setting it to anything less than0.01
will result in a0
starting balanceCurrency
- 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
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.
Distributed under the MIT License. Click HERE to view Craig's license.