Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 773 Bytes

README.md

File metadata and controls

38 lines (26 loc) · 773 Bytes

Wumpy-gateway

Gateway implementation for the Wumpy project.

Installation

Wumpy-gateway is available as a package on PyPI. Just use your favourite package manager such as pip or Poetry:

# Installing from PyPI using pip:
pip install wumpy-gateway
# Alternatively, using Poetry:
poetry add wumpy-gateway

Quickstart

The API of wumpy-gateway is very simple:

from wumpy.gateway import Shard


INTENTS = 65535
TOKEN = 'ABC123.XYZ789'


async def main():
    # Connect to the URI wss://gateway.discord.gg/ with the token
    # ABC123.XYZ8789 and all intents.
    async with Shard('wss://gateway.discord.gg/', TOKEN, INTENTS) as ws:
        async for event in ws:
            print(event)  # The deserialized JSON event payload