bmbowdish / Bolas

An extensible Magic the Gathering card fetcher bot for discord

Home Page:https://theneosloth.github.io/Bolas/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stats Docker Pulls

Bolas

https://theneosloth.github.io/Bolas/

Bolas is a mtg card-fetcher discord bot that is heavily inspired by yawgmoth. I am using this project as a way to try out some new approaches to api wrappers and plugin systems, so the way some parts of the bot are implemented are a bit esoteric.

Structure

The core of the bot is located in bot.py, all simple commands such as !pingme should go in commands.py. More advanced functionality such as the card fetcher should be developed in card_hooks.py. Those files contain the base class that the plugins should be derived from.

The plugins are loaded through a metaclass called PluginMount. Every class derived from PluginMount will be automatically loaded and added to either the self.chat_hook or self.commands variables.

The docstring for each one of the plugins are all concatenated together and can be displayed with the hardcoded “!help” command.

How to run

Export BOLAS_SECRET_TOKEN. Execute run.py.

export BOLAS_SECRET_TOKEN=THIS-IS-A-SECRET
python ./run.py

Using docker

The arm64v8 and amd64 images are available at neosloth/bolasbot. For other architectures the image can be built using the included Dockerfile

Building the image

docker build --tag=bolasbot .

Running Bolas

docker run -e BOLAS_SECRET_TOKEN=THIS_IS_A_SECRET --name bolas --restart unless-stopped bolasbot

Add Bolas to your Discord server

Click here

About

An extensible Magic the Gathering card fetcher bot for discord

https://theneosloth.github.io/Bolas/

License:MIT License


Languages

Language:Python 98.9%Language:Dockerfile 0.6%Language:Vim Script 0.5%