Skip to main content
Faculty Bot can automatically fetch and post weekly meal plans from university cafeteria websites. The bot downloads PDF meal plans, converts them to images, and posts them to Discord.

Configuration

mealplan
object
required
Meal plan automation settings.
"mealplan": {
  "postMealplan": true,
  "url": "http://www.max-manager.de/daten-extern/augsburg/pdf/wochenplaene/hs-kempten/aktuell.pdf",
  "check": 30,
  "postOnDay": "Monday",
  "postAtHour": "09:00:00",
  "imgsettings": {
    "density": 400,
    "quality": 100,
    "flatten": false,
    "width": 768,
    "height": 512
  }
}

Basic Settings

mealplan.postMealplan
boolean
required
Enable or disable automatic meal plan posting.
"postMealplan": true
Set to false to disable the meal plan feature entirely.
mealplan.url
string
required
URL to the PDF meal plan.
"url": "http://www.max-manager.de/daten-extern/augsburg/pdf/wochenplaene/hs-kempten/aktuell.pdf"
The URL should point directly to a PDF file. The bot downloads this PDF and converts it to an image.
Make sure you have permission to automatically fetch and redistribute the meal plan.
mealplan.check
number
required
Check interval in minutes.
"check": 30
The bot checks if it’s time to post the meal plan every 30 minutes. This doesn’t need to be exact since posting only happens at the scheduled day and time.
Lower values make the posting time more precise but use more resources. 30 minutes is a good default.

Scheduling

mealplan.postOnDay
string
required
Day of the week to post the meal plan.
"postOnDay": "Monday"
Valid values:
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Cafeterias typically post weekly plans on Monday mornings.
mealplan.postAtHour
string
required
Time of day to post the meal plan (24-hour format).
"postAtHour": "09:00:00"
Format: HH:MM:SSThe bot posts the meal plan when both the day matches and the current hour matches the configured hour.
Time is checked against the server’s local timezone.

Image Settings

mealplan.imgsettings
object
required
PDF to image conversion settings.
"imgsettings": {
  "density": 400,
  "quality": 100,
  "flatten": false,
  "width": 768,
  "height": 512
}
The bot uses ImageMagick’s convert command. Make sure ImageMagick is installed on your server!
mealplan.imgsettings.density
number
DPI (dots per inch) for rendering the PDF.
"density": 400
Higher values produce sharper images but larger file sizes. 400 DPI is a good balance for readable text.
mealplan.imgsettings.quality
number
Image quality from 0-100.
"quality": 100
100 is maximum quality (least compression). Lower values reduce file size.
mealplan.imgsettings.flatten
boolean
Whether to flatten the image layers.
"flatten": false
Set to true to merge all layers in the PDF. Usually not needed for simple meal plans.
mealplan.imgsettings.width
number
Maximum width in pixels.
"width": 768
The image will be scaled to fit within this width while maintaining aspect ratio.
mealplan.imgsettings.height
number
Maximum height in pixels.
"height": 512
The image will be scaled to fit within this height while maintaining aspect ratio.

How It Works

  1. Every check minutes, the bot checks the current day and time
  2. If it matches postOnDay and postAtHour, the bot:
    • Downloads the PDF from the configured URL
    • Converts it to a PNG image using the image settings
    • Posts it to the configured meal plan channel
    • Pings users with the mealplannotify role
    • Adds a button for users to subscribe to notifications
  3. The bot tracks which days it has posted to avoid duplicates

Force Posting

Staff members can manually trigger a meal plan post using:
/force_post_mensaplan
This bypasses the schedule and posts immediately.

Example Post

@MealPlanNotify
[Meal Plan Image]

[Button: Get Notified on new plans! 🍲]
Users clicking the button receive the mealplannotify role and get pinged for future meal plans.

System Requirements

ImageMagick must be installed on your server for PDF conversion to work!
Install ImageMagick:
Ubuntu/Debian
sudo apt-get update
sudo apt-get install imagemagick
macOS
brew install imagemagick

Complete Example

{
  "mealplan": {
    "postMealplan": true,
    "url": "http://www.max-manager.de/daten-extern/augsburg/pdf/wochenplaene/hs-kempten/aktuell.pdf",
    "check": 30,
    "postOnDay": "Monday",
    "postAtHour": "09:00:00",
    "imgsettings": {
      "density": 400,
      "quality": 100,
      "flatten": false,
      "width": 768,
      "height": 512
    }
  },
  "channels": {
    "mealplan": "899606239804268545"
  },
  "roles": {
    "mealplannotify": "899619452897882142"
  }
}

Build docs developers (and LLMs) love