Gateways connect Alter to Discord and Telegram bots so you can chat with Alter from those apps. Each gateway runs locally on your Mac — Alter must be open and running for messages to be processed.
What Gateways do
Gateways let you use Alter from chat platforms you already have open:- Discord — DM the bot or mention it in a server channel (when configured).
- Telegram — Message the bot in a private chat or group.
- Receives it through the platform bot connection.
- Runs the selected Alter Action (for example Ask Anything).
- Streams the reply back into the Discord channel or Telegram chat.
- Can download incoming attachments and upload output files from tool runs.
Open Gateways settings
1
Open Settings
Press ⌘, (Command + Comma), click the Alter menu bar icon and choose Settings…, or open Settings from the notch ⋯ menu.
2
Go to Integrations → Gateways
In the settings sidebar, open Integrations, then select Gateways.
com.wearedevx.alter://settings?id=gateways
The Gateways page shows every configured gateway. Use Add gateway to create a Discord or Telegram connection.
Setup guides
Discord gateway
Create a Discord bot, enable intents, invite it to your server, and connect it in Alter.
Telegram gateway
Create a bot with BotFather and paste the token into Alter.
Gateway settings reference
Every gateway shares these fields:
Platform-specific Connection fields are documented in the setup guides:
After saving an enabled gateway, Alter shows a status line such as Connected as @username or an error you can act on.
Keep gateways online with the lid closed
On a MacBook, closing the lid normally puts the Mac to sleep and disconnects gateway bots. Alter can keep active gateways available while the lid is closed. At the top of Settings → Integrations → Gateways:Battery safeguards
Alter pauses lid-closed availability automatically to protect battery life:- Pause below — While the Mac is unplugged and discharging, Alter restores normal sleep at or below this level (default 20%, adjustable from 5% to 50% in 5% steps). Lid-closed availability turns back on after charging above the limit.
- Pause in Low Power Mode — Always honored while macOS Low Power Mode is on.
Which actions work on Gateways?
Actions opt in to external platforms. In the Action Editor, open the Gateways section and choose Availability:
In Settings → Integrations → Gateways, each gateway shows an Available actions list for its platform. Use it to confirm which actions are enabled and jump straight into Action Editor → Gateways for any listed action.
People can still switch actions per conversation with
/new [action] or the Choose action picker as long as that action is allowed on the platform.
Parameterless vs parameterized actions
When someone picks an action from Choose action (or/actions):
- Parameterless actions (no input fields in the Action Editor) start immediately — Alter runs the action using its configured prompt, the same as a one-click launch in the Hub.
- Parameterized actions (with input fields) start a new conversation and wait for the next message so the user can supply those inputs.
Chat commands and controls
Both Discord and Telegram support the same text commands (type them as regular messages). On Telegram, commands also work with a bot suffix such as/help@YourBotName.
On Discord, Alter also registers native slash commands (
/help, /new, /actions, /chats, /history, /stop, /status) when the bot connects. If you set a Server ID, commands register for that server only; otherwise they register globally for the bot application.
Both platforms also expose buttons for common tasks — for example New chat, Choose action, and Past chats on /help. Telegram uses inline keyboards; Discord uses message components. When an action uses the Ask User tool, Alter presents multiple-choice questions through those same interactive controls (and accepts typed replies for “Other” answers).
Any message that is not a command is treated as a chat turn in the current conversation.
Daily usage
- Keep Alter running on your Mac with the gateway Enabled. On a MacBook, turn on Keep gateways online with the lid closed if you want bots to stay connected with the lid shut.
- Message the bot on Discord or Telegram (or
@mentionit in Discord servers when Require a mention in servers is on). - Alter shows a Thinking… placeholder while the action runs, then updates with the streamed reply. In Telegram DMs, Alter can stream through Telegram’s native draft preview when supported; in groups it edits a regular message instead.
- Attach files in Discord or Telegram — Alter downloads them for the turn and can upload output files from tools. Voice messages and audio files are transcribed using your selected voice processor (Settings → Voice) and sent to Alter as text; longer audio is also attached as a meeting-style transcript context.
- Use
/stop, the Stop button (Telegram groups and Discord), or wait for the turn to finish before sending another message in the same channel or chat.
One response at a time
Alter handles one in-flight response per channel or chat. If a second message arrives while Alter is still responding, the bot replies that Alter is already responding in that channel or chat. Wait for the current turn to finish, then send again.Conversation continuity
Each Discord channel or Telegram chat can have one active Alter conversation. Use/new to start fresh, or /chats and /use to resume an existing Alter conversation from your Mac.
On Discord, enabling Start server discussions in threads gives each new top-level server message its own thread and Alter chat. Replies inside an existing thread continue that chat instead of starting another.
Privacy and data
- Bot tokens are stored in the macOS Keychain, not in plain-text settings files.
- Gateway configuration (names, access lists, default actions) is stored locally in Alter’s preferences on your Mac.
- Per-channel state (selected conversation, pending action) is stored under Alter’s Application Support folder.
- Message processing uses the same local Alter stack as the Hub — there is no separate cloud relay for gateway traffic.
Troubleshooting
Connection and tokens
Usage
Lid-closed availability
Platform notes
- Alter must be running — closing Alter stops gateway bots until you reopen the app. On a MacBook, Keep gateways online with the lid closed keeps the Mac awake while gateways run, but Alter still needs to stay open.
- Bot messages are ignored on both platforms.
- Discord adds 👀 while processing your message, then ✅ or ❌ when the turn finishes. User-added reactions are not treated as commands or chat input.
- Telegram uses long polling for
messageandcallback_queryupdates (inline keyboard taps). After a turn completes, Alter may react with 👍 or 👎 on your message. Group chats show a Stop button during active turns.
Related pages
- Set up a Discord gateway
- Set up a Telegram gateway
- Alter Actions — Gateway availability — configure actions and gateway availability
- Alter Settings
- Integrations overview
- API Gateway Guide — OpenAI-compatible API (separate from chat Gateways)