Skip to content

Commit 6a27d49

Browse files
committed
Add wumpy-gateway module docstring
1 parent aa61e06 commit 6a27d49

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1+
"""Gateway implementation for the Wumpy project.
2+
3+
This module contains a main `Shard` class, to get started import it and use the
4+
`connect()` classmethod as an asynchronous context manager:
5+
6+
```python
7+
from wumpy.gateway import Shard
8+
9+
10+
TOKEN = 'ABC123.XYZ789'
11+
INTENTS = 65535
12+
13+
14+
async def main():
15+
# Connect to the URI wss://gateway.discord.gg/ with the token
16+
# ABC123.XYZ8789 and all intents.
17+
async with Shard.connect('wss://gateway.discord.gg/', TOKEN, INTENTS) as ws:
18+
async for event in ws:
19+
print(event) # The deserialized JSON event payload
20+
```
21+
"""
22+
123
from .errors import *
224
from .shard import *

0 commit comments

Comments
 (0)