Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 612 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 612 Bytes

Chocobot

Small piece of Rust code which sends a Discord dm whenever one of my service crashes.

Config

This code uses three environment variables to work, DISCORD_OWNER_ID, DISCORD_TOKEN and LOCAL.

  • DISCORD_OWNER_ID is the UUID of the one who will receive DMs.
  • DISCORD_TOKEN is the bot Discord token. See Discord developers doc.

My services are running on Raspberry PIs, and if the code is running inside the same network, I would rather use their local IP address. If LOCAL is set, the local IP addresses will be used instead of domain names.