Skip to content

tyrm/lebronch

Repository files navigation

Lebronch - Telegram Brunch RSVP Bot

A Telegram bot that sends scheduled brunch invitations to group chats with RSVP functionality.

Features

  • Scheduled Messages: Sends brunch invitations on a cron schedule
  • Random Content: Picks random GIFs and messages from configured lists
  • RSVP System: 4-button RSVP system (0-3) for attendees and guests
  • Live Updates: Message updates in real-time as people RSVP
  • Guest Tracking: Shows +1 or +2 for additional guests
  • Auto-cleanup: Removes RSVP buttons after configurable timeout

Configuration

Create a config.yaml file with the following structure:

bot_token: "YOUR_BOT_TOKEN"
group_chat_id: -1001234567890
cron_schedule: "0 10 * * SUN"
rsvp_timeout_minutes: 120
gif_file_ids:
   - "FILE_ID_1"
   - "FILE_ID_2"
brunch_messages:
   - "🥞 Brunch time! Who's joining?"
   - "🍳 Weekend brunch alert!"

Configuration Fields

  • bot_token: Your Telegram bot token from BotFather
  • group_chat_id: The ID of your group chat (negative number for groups)
  • cron_schedule: Standard cron format for scheduling messages
  • rsvp_timeout_minutes: How long before RSVP buttons are removed
  • gif_file_ids: List of Telegram File IDs for random GIF selection
  • brunch_messages: List of invitation messages to randomly choose from

Usage

Run the bot with a custom config file location:

lebronch -config /path/to/config.yaml

Or use the default config.yaml in the current directory:

lebronch

Docker

Pull and run the pre-built container:

docker run -v /path/to/config.yaml:/config.yaml tyrm/lebronc

Or use docker-compose:

version: '3'
services:
  lebronch:
    image: tyrm/lebronc
    volumes:
      - ./config.yaml:/config.yaml
    restart: unless-stopped

How It Works

  1. Bot sends a random GIF followed by a random brunch message at scheduled times
  2. Message includes 4 RSVP buttons:
    • 0: Cancel RSVP
    • 1: Just yourself
    • 2: You + 1 guest
    • 3: You + 2 guests
  3. Clicking a button updates the message with:
    • Attendee list under "Attending:"
    • Guest counts shown as "+1" or "+2"
    • Total RSVP count at the bottom
  4. After the timeout period, buttons are removed but the RSVP list remains

Getting File IDs

To get File IDs for GIFs:

  1. Send a GIF to your bot in a private chat
  2. Use the Telegram Bot API to get message updates
  3. Extract the file_id from the animation object

Cron Schedule Examples

  • "0 10 * * SUN" - Every Sunday at 10 AM
  • "30 9 * * 6" - Every Saturday at 9:30 AM
  • "0 11 * * 0,6" - Weekends at 11 AM
  • "0 */2 * * *" - Every 2 hours (for testing)

About

Scheduled Telegram brunch RSVP bot with guest tracking and mimosa preferences

Resources

License

Stars

Watchers

Forks

Packages

No packages published