In the documentation
Events
The Discord API uses a real-time event system transmitted via a WebSocket connection to allow client applications to receive instant updates from the server.
Important
Please see the dedicated section for more information.