hermes-fly supports optional notifications via Telegram and Discord. The deploy
wizard prompts for messaging setup, or configure it later by rerunning
hermes-fly deploy.
-
Open Telegram and search for
@BotFather. -
Send
/newbot. -
Follow the prompts to choose a name and username for your bot.
-
BotFather replies with a bot token in the format:
123456789:ABCdefGHIjklMNOpqrSTUvwxYZ -
Save this token. You will enter it during the deploy wizard.
Your Telegram user ID is a numeric identifier (not your username). To find it:
- Search for
@userinfoboton Telegram. - Send it any message.
- It replies with your user ID (a number like
123456789).
Alternatively, forward a message from yourself to @userinfobot.
If you want notifications sent to a group:
-
Add your bot to the group.
-
Send a message in the group.
-
Open this URL in a browser (replace
YOUR_BOT_TOKEN):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates -
Look for
"chat":{"id":-100XXXXXXXXXX}in the response. The negative number is your group chat ID.
When prompted during deployment:
- Bot token -- paste the token from BotFather
- Allowed user IDs -- paste a comma-separated list of Telegram user IDs permitted to interact with the bot
The token is stored via fly secrets set and never written to disk.
- Go to the Discord Developer Portal.
- Click "New Application" and give it a name.
- Note the Application ID on the General Information page.
- In your application, go to the "Bot" section (a bot user is created automatically with your application).
- Click "Reset Token" to reveal and generate a new token.
- Copy the bot token and save it securely.
Your bot needs these permissions to send messages:
- Send Messages
- Embed Links (optional, for rich notifications)
To generate an invite URL:
- Go to "OAuth2" > "URL Generator".
- Under "Scopes", select
bot. - Under "Bot Permissions", select
Send Messages. - Copy the generated URL and open it in a browser to add the bot to your server.
If your bot needs to read messages (not just send):
- Go to "Bot" settings.
- Enable "Message Content Intent" under Privileged Gateway Intents.
For notification-only use, this is not required.
- In Discord, go to User Settings > Advanced > enable "Developer Mode".
- Right-click the channel where you want notifications.
- Click "Copy Channel ID".
When prompted during deployment:
- Bot token -- paste the bot token from the Developer Portal
- Allowed user IDs -- paste a comma-separated list of Discord user IDs permitted to interact with the bot
The token is stored via fly secrets set and never written to disk.
- Verify the bot token format: digits, colon, then alphanumeric characters.
- Confirm the chat ID is correct. User IDs are positive numbers; group IDs are negative.
- Make sure the bot has been started. Send
/startto your bot in a direct message. - If using a group, ensure the bot has been added to the group.
- Verify the bot token is correct (reset it in the Developer Portal if unsure).
- Confirm the bot has been invited to the server with "Send Messages" permission.
- Check that the channel ID is correct (use Developer Mode to copy it).
- Ensure the bot has access to the specific channel (check channel permission overrides).
Rerun hermes-fly deploy to reconfigure messaging, or set secrets directly:
# Telegram
fly secrets set TELEGRAM_BOT_TOKEN="your-token" -a your-app-name
fly secrets set TELEGRAM_ALLOWED_USERS="comma-separated-user-ids" -a your-app-name
# Discord
fly secrets set DISCORD_BOT_TOKEN="your-token" -a your-app-name
fly secrets set DISCORD_ALLOWED_USERS="comma-separated-user-ids" -a your-app-name