Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Blert Discord Bot

This repository contains the code for Blert.io's official Discord bot.

Slash Commands

Account Linking

  • /link-discord: Instructions to generate a linking code on https://blert.io
  • /verify <code>: Validates the code and links the Discord account

Admin-Only

  • /issue: Generate GitHub issue drafts from recent chat context
  • /grant-api-access <user>: Allow a linked Discord user to create API keys

Configuration

Set these environment variables to run the bot:

  • DISCORD_TOKEN: Bot token
  • BOT_USER_ID: Discord user ID for this bot
  • BLERT_DISCORD_BOT_SECRET: Shared secret for admin API calls
  • BLERT_ADMIN_API_BASE: Optional override for the admin API base URL
  • BLERT_GUILD_ID: Discord server where slash commands are registered
  • BLERT_ADMIN_ROLE_IDS: Comma-separated role IDs allowed to grant API access
  • BLERT_ADMIN_USER_IDS: Comma-separated user IDs always treated as admins
  • PROMPTS_DIR: Directory containing prompt files (default prompts)
  • SQLITE_DB_PATH: Path to the SQLite database for user data
  • GITHUB_APP_ID, GITHUB_PRIVATE_KEY_PATH: GitHub App credentials

Virtual environment

All commands must be run from within the venv.

. .venv/bin/activate

Command Syncing

To register or refresh slash commands:

python bot.py --sync-commands

During development, this syncs commands directly to the guild specified by BLERT_GUILD_ID. To remove the guild-specific versions later:

python bot.py --clear-guild-commands

Running the Bot

python bot.py

The bot loads prompt files and listens to Discord events using the configuration above.

Testing

Activate the virtual environment and run the unit tests:

python -m unittest discover tests

About

Discord bot for Blert.io

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages