mix lemon. send
(lemon_channels v0.1.0)
View Source
Send a Telegram or Discord notification from shell scripts, cron jobs, and CI.
Usage:
mix lemon.send --to telegram:<chat_id> "deploy finished"
echo "RAM 92%" | mix lemon.send --to telegram:<chat_id>
mix lemon.send --to telegram:<chat_id>:<thread_id> --subject "[CI]" --file report.txt
mix lemon.send --to discord:<channel_id> "deploy finished"
mix lemon.send --account work --to discord:#ops "deploy finished"
mix lemon.send --to discord:#ops --thread deploys "deploy finished"
mix lemon.send --to discord:#ops --reply-to 123456789 "deploy finished"
mix lemon.send --to discord:<channel_id> --attach report.txt "artifact ready"
mix lemon.send --dry-run --to discord:<channel_id> --attach report.txt "artifact ready"
mix lemon.send --account work --list telegramTargets are intentionally limited to Telegram and Discord for now.
--account selects the channel account id for delivery and known-target lookup.
--thread / --topic sets the thread or topic separately from the target.
--reply-to replies to an existing platform message id.
--file reads the message body from a file; --file - forces stdin.
--attach uploads a local file and may be repeated up to 10 times; any body text becomes the caption.
--dry-run validates the target/body/attachments and prints the send summary without delivery.
Default targets can be supplied through LEMON_TELEGRAM_DEFAULT_CHAT_ID,
LEMON_DISCORD_DEFAULT_CHANNEL_ID, and optional *_DEFAULT_THREAD_ID vars.