# Gateway

> The persistent WebSocket connection over which Discord pushes real-time events to a bot. Bots receive messages, joins and edits through the gateway rather than by polling.

- Canonical: https://discordtools.blog/glossary/gateway
- Group: Platform
- See also: https://discordtools.blog/glossary/intent, https://discordtools.blog/glossary/sharding, https://discordtools.blog/glossary/rate-limit
- Updated: 2026-08-31
- Publication: The Index, an independent site not affiliated with Discord Inc.

---
A bot that is "offline" has lost its gateway connection. Actions the bot takes are sent over
the REST API, but everything it *reacts to* arrives over the gateway — which is why a bot can
appear online and still miss events if its connection is degraded.