EscapeRoomsCommunity / escape_roomba

A Discord bot to bring ease and joy to the Escape Room community discord.
MIT License
1 stars 2 forks source link
bot discord python3

Escape Roomba

Removing the dust bunnies from the Escape Rooms Discord, since 2020.

Escape Roomba

This is experimental Discord automation to support the Escape Rooms Discord community.

Useful Resources

Developer setup instructions (Mac or Linux)

Basic build setup

  1. Install "poetry", the Python dependency manager. Beware of bug 721 which affects installation.
  2. Install direnv (optional, but recommended).
  3. In this directory, run poetry install.
  4. If you installed direnv, in this directory, run direnv allow.

You can now use thread_bot (without direnv: poetry run thread_bot) to run a bot. However, you need a bot token in $ESCAPE_ROOMBA_BOT_TOKEN to actually run and connect to Discord. For the prod bot token, talk to egnor@. To make a test bot account to develop with, keep reading...

Setting up a test bot on Discord

Follow the "Creating a Bot Account" instructions from the discord.py docs.

If you're using direnv, create an .envrc.private file in this directory with these contents:

# DO NOT CHECK IN
export ESCAPE_ROOMBA_BOT_TOKEN='your token here'

(If you're not using direnv, set $ESCAPE_ROOMBA_BOT_TOKEN some other way.) To refresh direnv, cd out and back into this directory. Now you should be able to start thread_bot, which should log an invite URL at startup:

09-11 11:51:17 root [INFO] Connected to Discord:
    wss://gateway.discord.gg?encoding=json&v=6&compress=zlib-stream
09-11 11:51:19 root [INFO] Ready in 1 servers (as Jaxlyn's Test Bot#1234):
    Jaxlyn's Test Server
09-11 11:51:19 root [INFO] Open this link to add this bot to more servers:
    https://discord.com/oauth2/authorize?client_id=753465244491317259&scope=bot&permissions=268512336

Follow the invite link to add this bot to a Discord server you administer (you may wish to create a new server for this purpose). You only need to do this once; henceforth, whenever a bot is running with that bot token, it should be active on all Discord servers it was invited to.