master
*** This project lives @ https://gitlab.rickelobe.com/Bots/R0b3BOT ***
Description
This is R0b3's Discord Bot. It's creation was basically a challenge posed a coworker who said "Hey, you can write Discord Bots in Python... Make one to display your 3D printer status!".
Features
- Query & Monitor OctoPrint 3D Printer Status using the
$printstatcommand (Requires that your printer is connected to Octoprint)

- Query & Monitor Bambu Lab Printer Status using the
$bambustatcommand (Requires a Bambu Lab printer accessible on the local network via MQTT)
- Displays print state, progress percentage, time remaining, current layer, bed temp, nozzle temp, and chamber temp
- Optionally captures and attaches a camera snapshot from the printer's RTSPS stream (requires ffmpeg on the host)
- Updates the bot's Discord status to show live Bambu print progress while a print is running
- Play a selection of sound clips to voice channel members using the various commands (
$torololo,$oops,$promoted, etc)
Commands
Requirements
Install all Python dependencies using the provided requirements.txt:
pip install -r requirements.txt
Dependencies:
discord.py[voice]>= 2.6.4 — Discord bot framework (voice support included)requests>= 2.32.3 — HTTP client for HomeAssistant REST API callsbambu-connect>= 0.3.1 — Bambu Lab printer integration via local MQTTpaho-mqtt>= 2.0 — MQTT client library (required by bambu-connect)
Optional: Camera snapshot support
To enable camera snapshots with $bambustat, ffmpeg must be installed on the host running the bot. Set bambu_camera_enable = true in bot_config.conf once ffmpeg is available.
Configuration
- Create a Discord Bot via the Discord Developer Portal
- Copy
bot_config.conf.exampletobot_config.confand fill in your values (see below) - Rename
octoapi.conf.exampletooctoapi.confand configure OctoPrint settings (if using OctoPrint)
bot_config.conf Keys
| Key | Description |
|---|---|
discord_auth_token |
Bot token from the Discord Developer Console |
bot_command_prefix |
Command prefix (e.g. $, !, /) |
hass_url |
URL to your Home Assistant instance |
hass_token |
Long-lived access token for Home Assistant REST API |
hass_light |
Entity ID of the light at your printer |
octoprint_ip_address |
IP address of your OctoPrint/OctoPi host |
bambu_ip_address |
IP address of your Bambu Lab printer on the local network |
bambu_access_code |
Access code shown on the printer screen (Settings > WLAN) |
bambu_serial_number |
Serial number of your Bambu Lab printer |
bambu_camera_enable |
Set to true to capture camera snapshots with $bambustat (requires ffmpeg) |
statping_enable |
Set to true to enable StatPing service status integration |
statping_url |
URL of your StatPing instance |
statping_api_key |
API key for StatPing |
mmr_checker_enable |
Set to true to enable MMR checker |
mmr_checker_interval |
Seconds between MMR checks |
mmr_api_url |
MMR API URL |
Description
A Discord Bot that can be used to monitor & query the status of your 3D printer via Octoprint, among other things.
Readme
MIT
51 MiB
0 Stars
1 Watchers
0 Forks
