Thanks to visit codestin.com
Credit goes to github.com

Skip to content

banodoco/brain-of-bdnc

Repository files navigation

BNDC's Brain

This is the Brain of BNDC, a friendly robot dedicated to helping our around the Banodoco and open source AI art communities. His goal is to streamline the sharing and discovery of knowledge, making it easier for everyone to contribute, learn, and connect.

Features

  • 📚 Summarization: Generates daily or on-demand summaries of activity, grouped by topic (summarising).
  • ✍️ Content Synthesis: Creates long-form articles and reports by synthesizing related discussions (combines summarising/answering).
  • 💾 Archiving & Logging: Maintains a searchable archive of all messages, files, and media (logging).
  • Curation: Automatically identifies high-quality posts and important discussions (curating).
  • Reaction Workflows: Triggers automated actions based on message reactions (reacting).
  • 🔗 Message Relaying: Relays messages to external services or platforms via webhooks (relaying).
  • 📣 Social Sharing: Shares curated content or summaries to external platforms like Twitter (sharing).
  • 🧠 Question Answering: Answers questions about past discussions using the community's conversation history (answering) (Coming Soon).

Code Structure

For a detailed LLM-friendly overview of the code structure, see structure.md. This file provides a comprehensive breakdown of each directory and module that can be used to help understand or extend the codebase.

Live Demo

Want to see it in action? Join the Banodoco Discord server!

Setup

Deployment Options

You can run this bot either:

  • Locally - On your own machine (see Local Installation below)
  • Railway - Deploy to the cloud with one click (see RAILWAY_DEPLOYMENT.md)

Local Installation

  1. Clone the repository:
git clone https://github.com/banodoco/brain-of-bdnc.git
cd brain-of-bdnc
  1. Install required dependencies:
pip install -r requirements.txt
  1. Copy the example environment file .env.example to a new file named .env:
cp .env.example .env

Then, open the .env file and fill in the required values. Refer to the comments in .env.example for guidance on each variable.

Railway Deployment

For deploying to Railway (recommended for production):

  1. See the complete guide: RAILWAY_DEPLOYMENT.md
  2. Quick start: RAILWAY_QUICK_START.md
  3. Railway offers:
    • ✅ Automatic deployments from GitHub
    • ✅ Free tier available
    • ✅ Built-in logging and monitoring
    • ✅ Easy environment variable management
    • ✅ Persistent storage options

Database Storage

The bot uses Supabase (Cloud PostgreSQL) for data storage:

  • See SUPABASE_MIGRATION.md for setup guide
  • Free tier: 500MB storage, perfect for most Discord servers
  • Automatic backups and high scalability

Ensure you have SUPABASE_URL and SUPABASE_SERVICE_KEY environment variables set.

Running the Bot

Basic operation:

python main.py

Development mode - using test data and channels:

python main.py --dev

Run summary immediately:

python main.py --run-now

Archive historical messages (e.g., from the past 30 days):

python scripts/archive_discord.py --days 30

Bot Permissions

The bot requires the following Discord permissions:

  • Read Messages/View Channels
  • Send Messages
  • Create Public Threads
  • Send Messages in Threads
  • Manage Messages (for pinning)
  • Read Message History
  • Attach Files
  • Add Reactions
  • View Channel
  • Manage Threads

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Archive management commands:

# Archive specific channels or date ranges
python scripts/archive_discord.py --channel-id <channel_id> --start-date YYYY-MM-DD

# Clean up test or temporary data
python scripts/cleanup_test_data.py

# Migrate database schema
python scripts/migrate_db.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages