Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zechcodes/dippy.core
☢️ EARLY ALPHA☢️ A bare-bones Discord gateway client that can be used to build Python bot frameworks for Discord.
https://github.com/zechcodes/dippy.core
aiohttp alpha api-client api-wrapper asyncio discord-bot hacktoberfest hacktoberfest2021 python
Last synced: 1 day ago
JSON representation
☢️ EARLY ALPHA☢️ A bare-bones Discord gateway client that can be used to build Python bot frameworks for Discord.
- Host: GitHub
- URL: https://github.com/zechcodes/dippy.core
- Owner: ZechCodes
- License: mit
- Created: 2021-04-22T20:51:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-09T22:31:35.000Z (about 3 years ago)
- Last Synced: 2025-01-07T03:39:59.434Z (3 days ago)
- Topics: aiohttp, alpha, api-client, api-wrapper, asyncio, discord-bot, hacktoberfest, hacktoberfest2021, python
- Language: Python
- Homepage:
- Size: 508 KB
- Stars: 3
- Watchers: 2
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Dippy.Core
This is a bare-bones Discord gateway client that can be used to build Python bot frameworks for Discord.
# ☢️ THIS IS ALPHA SOFTWARE ☢️
There will be bugs and not all features are implemented. It should be fine to use it but if it goes crazy and gets your bot token reset, well, you've been warned. (Fwiw I've not had issues during development so far)
**PLEASE** report any bugs or issues here. __If you would like to contribute feel free!__
## Installation
```shell
pip install dippy.core
```## Usage
`dippy.core` relies heavily on the [Bevy Package](https://pypi.org/project/bevy/). Since this is not intended as a consumer facing package it will be necessary to directly set up a Bevy context with all of the `dippy.core` dependencies.
### Connecting
```python
import asyncio
from bevy import Context
from asyncio import get_event_loop
from dippy.core import CacheManager, EventDispatch, Intents
from dippy.core.api.api import DiscordAPI
import logging
import osasync def start(loop):
context = Context()
context.add(loop)async with context.create(
DiscordAPI, os.getenv("DISCORD_TOKEN"), intents=Intents.ALL
) as api:
context.add(api)events = context.create(EventDispatch)
context.add(events)cache = context.create(CacheManager)
context.add(cache)async def ready(event):
await asyncio.sleep(2)
logging.info(f"Everything should be ready now {event.user.username}!")events.on("READY", ready)
await api.connect()
loop = get_event_loop()
loop.run_until_complete(start(loop))
```## Future
- Add models to wrap the event payload data
- Add rate limiting
- Add methods to models for using the API