|
26 | 26 | class Heartbeat(Thread): |
27 | 27 | """ |
28 | 28 | A class representing a consistent heartbeat connection with the gateway. |
| 29 | +
|
29 | 30 | :ivar WebSocket ws: The WebSocket class to infer on. |
30 | 31 | :ivar Union[int, float] interval: The heartbeat interval determined by the gateway. |
31 | 32 | :ivar Event event: The multi-threading event. |
@@ -72,6 +73,7 @@ def stop(self) -> None: |
72 | 73 | class WebSocket: |
73 | 74 | """ |
74 | 75 | A class representing a websocket connection with the gateway. |
| 76 | +
|
75 | 77 | :ivar Intents intents: An instance of :class:`interactions.api.models.Intents`. |
76 | 78 | :ivar AbstractEventLoop loop: The coroutine event loop established on. |
77 | 79 | :ivar Request req: An instance of :class:`interactions.api.http.Request`. |
@@ -143,6 +145,7 @@ async def connect( |
143 | 145 | ) -> None: |
144 | 146 | """ |
145 | 147 | Establishes a connection to the gateway. |
| 148 | +
|
146 | 149 | :param token: The token to use for identifying. |
147 | 150 | :type token: str |
148 | 151 | :param shard?: The shard ID to identify under. |
@@ -172,6 +175,7 @@ async def handle_connection( |
172 | 175 | ) -> None: |
173 | 176 | """ |
174 | 177 | Handles the connection to the gateway. |
| 178 | +
|
175 | 179 | :param stream: The data stream from the gateway. |
176 | 180 | :type stream: dict |
177 | 181 | :param shard?: The shard ID to identify under. |
@@ -230,6 +234,7 @@ async def handle_connection( |
230 | 234 | def handle_dispatch(self, event: str, data: dict) -> None: |
231 | 235 | """ |
232 | 236 | Handles the dispatched event data from a gateway event. |
| 237 | +
|
233 | 238 | :param event: The name of the event. |
234 | 239 | :type event: str |
235 | 240 | :param data: The data of the event. |
@@ -344,6 +349,7 @@ def contextualize(self, data: dict) -> object: |
344 | 349 | """ |
345 | 350 | Takes raw data given back from the gateway |
346 | 351 | and gives "context" based off of what it is. |
| 352 | +
|
347 | 353 | :param data: The data from the gateway. |
348 | 354 | :type data: dict |
349 | 355 | :return: The context object. |
@@ -375,6 +381,7 @@ async def identify( |
375 | 381 | ) -> None: |
376 | 382 | """ |
377 | 383 | Sends an ``IDENTIFY`` packet to the gateway. |
| 384 | +
|
378 | 385 | :param shard?: The shard ID to identify under. |
379 | 386 | :type shard: Optional[int] |
380 | 387 | :param presence?: The presence to change the bot to on identify. |
|
0 commit comments