Skip to main content
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.
Gateways (Discord/Telegram bots) are different from the API Gateway in Settings → Router, which exposes an OpenAI-compatible endpoint for third-party apps. See API Gateway Guide for that feature.

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.
Each gateway instance has its own name, Default action, access controls, and connection settings. Conversations are stored in Alter on your Mac the same way as Hub chats — gateways are another way to start and continue those conversations. When someone sends a message, Alter:
  1. Receives it through the platform bot connection.
  2. Runs the selected Alter Action (for example Ask Anything).
  3. Streams the reply back into the Discord channel or Telegram chat.
  4. 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.
You can also deep-link directly: 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.
Turning the main toggle off keeps the installed administrator permission, so you can enable it again without another prompt. Use Remove administrator permission… in Options… when you want to revoke it entirely.
Lid-closed availability changes a protected macOS sleep setting. Alter also runs a safety monitor that restores normal sleep if the app stops unexpectedly. Gateways still require Alter to be running — this feature keeps the Mac awake, not Alter closed.

Which actions work on Gateways?

Actions opt in to external platforms. In the Action Editor, open the Gateways section and choose Availability:
The bundled Ask Anything action defaults to All — it is the usual Default action for new gateways. Set None on Ask Anything if you want it local-only. Custom actions start on None until you enable a platform or All.
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

  1. 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.
  2. Message the bot on Discord or Telegram (or @mention it in Discord servers when Require a mention in servers is on).
  3. 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.
  4. 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.
  5. 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.
See also Local data and privacy.

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 message and callback_query updates (inline keyboard taps). After a turn completes, Alter may react with 👍 or 👎 on your message. Group chats show a Stop button during active turns.
For broader tool and permission issues, use Settings → Doctor or Tools not working. Doctor includes a Gateways section with per-gateway connection status (connected, reconnecting, failed) and access warnings when no allowlist is configured on an enabled gateway.