Skip to content

rpj/theburgbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

  1. Setup a reverse proxy to constants.DEFAULT_PORT to plumb the HTTP API endpoints.
  2. Set required environment variables:
    1. THEBURGBOT_DISCORD_TOKEN: bot's Discord token
    2. OPENAI_API_KEY: OpenAPI secret key for /gpt
    3. TWITCH_APP_ID: Twitch Application ID for /igdb
    4. TWITCH_APP_SECRET: Twitch Application secret for /igdb
  3. Create a Discord IDs JSON file and set all required IDs.
    1. Set environment variable THEBURGBOT_DISCORD_IDS_JSON_PATH to control the path, or create it at the default path
  4. Create a Reaction/Roles mapping JSON file.
    1. THEBURGBOT_REACTION_ROLES_JSON_PATH controls the path, or the default
  5. poetry install (poetry version >=1.5)

Running

poetry run main

If you change or update slash command definitions and want them to be reflected on Discord, use --sync_commands. Do not over-use this option as the action is (heavily) rate-limited!

Development

Test

poetry run pytest tests/

Lint

find ./theburgbot/ -name "*.py" | xargs poetry run pylint --rc-file=./.pylintrc

Fix style

poetry run black theburgbot/*.py theburgbot/cmd_handlers/*.py tests/*.py && \
    poetry run isort theburgbot/*.py theburgbot/cmd_handlers/*.py tests/*.py 

About

TheBurg.xyz's Discord bot

Resources

Stars

Watchers

Forks