tawilkinson / boardgamebot

A Discord.py bot that fetches board game data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Board Game Bot

All Contributors Python 3 CodeFactor Maintainability Updates

A Discord bot to fetch board game data and a list of places you can play them online.

Supported websites/services:

The main feature of the bot is to search Board Game Geek for information on a board game and then try to find online versions of the game to play as showcased below:

The bot's response to the command bg game Carcassonne which shows detials of the game and links to multiple online versions of the game

Feature List

All commands are called using bg <command> in a Discord channel. bg help will list all currently loaded commands.

  • Dice: simple dice roller
    • roll: Using standard dice notation: You can roll up to 9,999 dice with up to 9,999 sides each.
  • Fun: a selection of fun bot commands
    • theme: generates a random board game theme.
  • Games:
    • game <game name>: Prints detailed info about a board game. Uses BGG/local database to find the game and if that game exists gets information on places to play the game virtually.
    • bga: Lists all games currently avaialable on Board Game Arena (cache updates every 24 hours).
    • boite: Lists all games currently avaialable on Boîte a Jeux (cache updates every 24 hours).
    • tabletopia: Gives a link to Tabletopia as it has too many gmaes to list.
    • tts: Lists all official DLC currently avaialable for Tabletop Simulator (cache updates every 24 hours).
    • yucata: Lists all games currently avaialable on Yucata.de (cache updates every 24 hours).
  • No Category:
    • help: Shows the help message.
    • load: Loads a cog.
    • reload: Reloads a cog.
    • unload: Unloads a cog.

Quick-Start Guide

Following the steps here should get you a test bot up and running to hack on. If you want to just add the production version to your server, you'll have to wait.

This guide assumes the following:

  • You have set up a Discord Application with Administrator permissions in the Discord Developer Portal, added it to your Discord Server, and that you have the token at-hand*
  • You have git clone'd this repo and are currently in its top-level directory
  • Docker is installed and working (try docker run --rm hello-world, you'll know if it works!)
    • If you aren't using Docker, Quick-Start Guide [No Docker] after creating your .env file (steps 1 & 2)
  1. Create a file called .env in bot/python (so the full path will be eg. /home/yourname/boardgamefest/bot/python/.env) with the following contents:
DISCORD_TOKEN='REPLACEME'
  1. Replace REPLACEME in the .env file with your Discord Bot's Token
  2. Change directory to bot
  3. Run ./build.sh
  4. Run ./run.sh and check to see your bot comes online in Discord!

CTRL-C to end execution. Repeat steps 4 & 5 each time you make changes to bot.py.

* There is a good guide to this process

Quick-Start Guide [No Docker]

  1. Follow steps 1-2 above
  2. Change directory to bot/python
  3. Install dependencies by running pip install -r requirements.txt
    • Read requirements.txt if you need to check what they are
  4. Run python bot.py and check to see your bot comes online in Discord!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Tom Wilkinson

💻

sonmi451

💻

Michael Warr

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

A Discord.py bot that fetches board game data


Languages

Language:Python 97.8%Language:Shell 2.1%Language:Dockerfile 0.2%