Skip to content

PauseAI/PauseBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PauseBot

PauseBot is a Discord bot designed to streamline the onboarding pipeline for PauseAI. It listens for new members joining the server and, once they are assigned specific country roles, automatically sends an email to the corresponding country coordinator using the MailerSend API. It also automatically records new joining users to an Airtable database. It reports its email activities to a designated Discord channel.

Features

  • Automatic Onboarding Emails: Monitors new users and waits a few minutes. If a user is given a registered country role, an email is automatically sent to the country's coordinator.
  • Airtable Integration: Records new member details (username, nick, global name, join date, and role IDs) to an Airtable table.
  • Discord Notification Channel: Logs successful and failed email attempts directly to a designated Discord channel (e.g., #onboarding-pipeline).
  • Role-based Logic: Easily map new or existing Discord Role IDs to specific email addresses.

Prerequisites

  • Python 3.8+
  • A Discord Bot Token
  • A MailerSend API Key
  • An Airtable Personal Access Token (optional, if you want an Airtable log)

Setup

  1. Clone the repository:

    git clone <your-repository-url>
    cd PauseBot
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Environment Variables: Copy the example environment file and fill in your details:

    cp .env.example .env

    Edit .env and configure the following variables:

    • DISCORD_TOKEN: Your Discord bot token.
    • MAILERSEND_API_KEY: Your MailerSend API Key.
    • AIRTABLE_PERSONAL_ACCESS_TOKEN: The PAT from your Airtable account.
  5. Configure Roles and Channels (in main.py):

    • Update AIRTABLE_BASE_ID with your target Airtable base's ID.
    • Update AIRTABLE_TABLE_NAME with the table name where members will be recorded.
    • Update ONBOARDING_PIPELINE_CHANNEL_ID with the channel ID where the bot should log its actions.
    • Update the COUNTRY_ROLES dictionary with the Discord Role IDs and their corresponding coordinator email addresses.

Running the Bot

Run the bot directly via Python:

python main.py

Deployment

This bot is designed to be easily deployed to containerized environments or platforms like Railway or Heroku. Make sure to define your environment variables (DISCORD_TOKEN, MAILERSEND_API_KEY, etc.) in your deployment platform's dashboard.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages