Yet another Discord API wrapper for Python.
Project description
dico
Keep in mind that this project is still WIP, therefore it might be unstable.
Yet another Discord API wrapper for Python, aimed to follow Discord API format as much as possible but also simple and easy to use.
Features
- Discord v9 API (including Threads, components, context menus, etc.)
- Full interaction support
- API-Only supported, with aiohttp-based or requests-based HTTP client.
- More soon™
Installation
Development Version:
pip install -U git+https://github.com/dico-api/dico
PyPi(Not Recommended):
pip install -U dico-api
Quick Example
API Client
import dico
api = dico.APIClient("APPLICATION_TOKEN_HERE", base=dico.HTTPRequest)
# You may use AsyncHTTPClient for async support.
# All endpoints are implemented, and for the example request_user (= Get User) will be used.
user = api.request_user() # You may pass any user ID or it will be the application itself.
# You may use either int, str, dico.Snowflake, or dico.User itself.
print(user.username)
Websocket Client
import dico
client = dico.Client("YOUR_BOT_TOKEN_HERE", intents=dico.Intents.full())
@client.on_message_create
async def on_message_create(message: dico.Message):
if message.content.startswith("!hello"):
await message.reply("Hello, World!")
client.run()
More examples are in here.
Requirements
- Python 3.7+
Extra Libs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dico-api-0.0.28.tar.gz
(476.1 kB
view details)
Built Distribution
dico_api-0.0.28-py3-none-any.whl
(492.6 kB
view details)
File details
Details for the file dico-api-0.0.28.tar.gz
.
File metadata
- Download URL: dico-api-0.0.28.tar.gz
- Upload date:
- Size: 476.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5677421d31c05f26eb5cda6c8bdd5484bc09b8c3a7d5c42e54ba59b670758a11 |
|
MD5 | b0ad7bd3b2a79def59a12284b149dcdb |
|
BLAKE2b-256 | 27070e18d5b560d1855960071edec6f21e8c70cd34edb056cb1e8d02bba1fd45 |
File details
Details for the file dico_api-0.0.28-py3-none-any.whl
.
File metadata
- Download URL: dico_api-0.0.28-py3-none-any.whl
- Upload date:
- Size: 492.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112b9ea74079dd56b2abdc6740f3b718475ebc3263f43b601431896c4e638495 |
|
MD5 | 0a7c4733503785264a1f25f1ac10d486 |
|
BLAKE2b-256 | 2493f58f060267b54dbf95343aca98c30199f0ba718e8f7ddfcfd3841751beee |