Building FenrirBot

What is FenrirBot?

FenrirBot is a simple python based Discord Bot that you can easily host at home on your own hardware, like a Raspberry Pi. I built FenrirBot for my World of Warcraft guild so that guildmates could quickly access information like raid times by typing the !raid command in Discord.

Prerequisites

To connect your bot, you're going to need create a new application from within the Discord Developer Portal. Discord.py has a nice little guide to walk you through the process if you need help.

You'll need somewhere to run a small .py application. I used Raspberry Pi 3 Model B+ so I could quickly get a proof of concept of our bot out.

Software

I have the Pi running the latest version of Raspbian Stretch Lite (June 2018 release at the time of this writing). The version of shipped with Python 3.5.3, but I went ahead and upgraded to 3.6.6 (since I've had issues using pip on the Pi running 3.7 in the past & for this, it's good enough).

nohup will allow the task to continue running after you terminate your SSH connection. & is going to run the task in the background to keep the terminal open for use. There is also an issue where the script auto-terminates after 2-3 hours, I've opened Issue 1 but I haven't had time to work on it. Learn more in the issue on setting up a Cron job to keep the bot running.