Skip to main content

Yet another Discord API wrapper for Python.

Project description

dico

Codacy Badge Discord

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.

Discord Server

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


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.33.tar.gz (478.9 kB view details)

Uploaded Source

Built Distribution

dico_api-0.0.33-py3-none-any.whl (496.1 kB view details)

Uploaded Python 3

File details

Details for the file dico-api-0.0.33.tar.gz.

File metadata

  • Download URL: dico-api-0.0.33.tar.gz
  • Upload date:
  • Size: 478.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for dico-api-0.0.33.tar.gz
Algorithm Hash digest
SHA256 85dcf9231502bff1fbf227b958318f7459bdf76209c1e10f302c7070e017ef31
MD5 64807168913ac8ec8770c2ca9237be82
BLAKE2b-256 dd62ac806815ef224c7501fbb3fae4a55702d017f86ed15d880ca0feda6cfe45

See more details on using hashes here.

File details

Details for the file dico_api-0.0.33-py3-none-any.whl.

File metadata

  • Download URL: dico_api-0.0.33-py3-none-any.whl
  • Upload date:
  • Size: 496.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for dico_api-0.0.33-py3-none-any.whl
Algorithm Hash digest
SHA256 664b75fdad7f4626b5f7114d350af06e009bcd74861b47649706574182287210
MD5 d1520430ac42220cee23bea889a456c8
BLAKE2b-256 36ca3bb792b5de20760daff57f358d4e4c9a2b689d95d8f837e40232151cdc54

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page