Skip to main content

Easy, simple, scalable and modular: a Python API wrapper for interactions.

Project description

==================== discord-interactions

Easy, simple, scalable and modular: a Python API wrapper for interactions.

.. image:: https://img.shields.io/pypi/dm/discord-py-slash-command.svg :target: https://pypi.python.org/pypi/discord-py-interactions/ :alt: PyPI Monthly Downloads

.. image:: https://img.shields.io/github/license/goverfl0w/discord-interactions.svg :target: https://github.com/goverfl0w/discord-interactions/blob/master/LICENSE :alt: License

.. image:: https://img.shields.io/pypi/pyversions/discord-py-interactions.svg :target: https://pypi.python.org/pypi/discord-py-interactions/ :alt: PyPI Versions

.. image:: https://img.shields.io/pypi/v/discord-py-interactions.svg :target: https://pypi.python.org/pypi/discord-py-interactions/ :alt: PyPI Version

.. image:: https://readthedocs.org/projects/discord-interactions/badge/?version=latest :target: http://discord-interactions.readthedocs.io/?badge=latest :alt: Documentation Status

.. image:: https://discord.com/api/guilds/789032594456576001/embed.png :target: https://discord.gg/KkgMBVuEkx :alt: Discord


Ever since December 2019, this open-source project has become the culmination of dedication and research towards figuring out the best way to bring interactions from Discord to you: we are an easy, simple, scalable and modular library for Discord interactions.

  • Tired of using numerous module dependencies for slash commands and buttons?
  • Looking for a compatible library that implements all interactions?
  • Itching to get your hands on slash commands, but in a simple manner?

Look no more! The goal of this library is to make all three of these questions go from possibilites to trivial matters.

What can we do?


Our library---inside and out, offers numerous benefits and presents itself as a worthy module in your bot's dependencies:

The base features of our library, built with our API include:

  • Dynamic object data generation: all event data dispatched from the Gateway is dynamically transformed and generated into two-way serializable JSON objects.
  • Sane rate limiting: our HTTP client implements pre-emptive rate limit avoidance, so your bot is guaranteed to never hit HTTP 429.
  • On-demand cache: every HTTP request and Gateway event made is cached when needed, so you never have to save information yourself.
  • Simplified data models: every object presented is accessible as either a raw dictionary/application/json or list of recursive attributes.

Some more unique features that are exclusive to our interactions include:

  • Event-triggered callbacks: whether a component, application command or interaction response, you'll never need to worry about bridging responses.
  • Dual-way decorator logic: a decorator can act as both a constructor for an interaction, as well as a callback.
  • API-strict naming: no more confusion with the naming approach of many libraries; we follow the naming style of interactions from the officially curated Discord Developers documentation.
  • Extensive framework structure: (pending in 4.1.0) build your own tools and technologies for our library to develop and integrate community creations.

What do we not offer?


While we certainly offer a lot of benefits, we unfortunately have our own downsides:

.. note:: This list is subject to change as time goes on: some of these items may be added to the core of the library in the future.

  • No native cooldown decorator/method.
  • Lack of automatic sharding and voice clients.

Where do I start?


Please check out our quickstart guide_ for some basic examples.

How can I contribute?


Please read up on our contribution requirements_ for the project. This open-source project also enforces the MIT License_.

This open-source project utilizes the following workflows for development:

#. pre-commit 2.16.0: the architecture uses this before every commit to format and check for severity/QOL-breaking changes.

#. black 21.11b1 #. flake8 3.9.2 #. isort 5.9.3

#. Sphinx 4.1.2: all of our documentation is powered off of autogenerated documentation of the Sphinx engine. #. colorama 0.4.4: our internal logger uses a customized coloring formatter to make looking for specific conditions easier when running tests. #. Conventional Commits 1.0.0: every commit that we make to our branches use the official specification of CC 1.0.0 to make git graphs easier when improving and refining communication between code reviews, Pull Requests and commits.

When can I start? ^^^^^^^^^^^^^^^^^ We also have some extra ground rules about making any specific contributions involving:

  • We do not accept abstraction-based requests. (e.g. colour for color)
  • A request has to be approved by at least one developer.
  • You must be willing to change/adhere to reviews from participants where necessary.

I think I'm all ready! ^^^^^^^^^^^^^^^^^^^^^^ Feel free to begin making Pull Requests_ and Issues_ on our GitHub!

.. _quickstart guide: https://discord-interactions.rtfd.io/en/latest/quickstart.html .. _contribution requirements: https://github.com/goverfl0w/discord-interactions/blob/stable/CONTRIBUTING.md .. _MIT License: https://github.com/goverfl0w/discord-interactions/blob/stable/LICENSE .. _Pull Requests: https://github.com/goverfl0w/discord-interactions/pulls .. _Issues: https://github.com/goverfl0w/discord-interactions/issues

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

discord-py-interactions-4.0.0.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_py_interactions-4.0.0-py3-none-any.whl (74.7 kB view details)

Uploaded Python 3

File details

Details for the file discord-py-interactions-4.0.0.tar.gz.

File metadata

  • Download URL: discord-py-interactions-4.0.0.tar.gz
  • Upload date:
  • Size: 62.7 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.10.0

File hashes

Hashes for discord-py-interactions-4.0.0.tar.gz
Algorithm Hash digest
SHA256 48b1869a77a45474c21d6e12657dc82c97342af10789c5a1e6d8ae8be51f2fe0
MD5 b3a7d2b1451950ff718fa666117426d9
BLAKE2b-256 a2356257877bb1a6b10e8adb0f7e53b27a2e97b6c401ae815b4ab139a4128057

See more details on using hashes here.

File details

Details for the file discord_py_interactions-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: discord_py_interactions-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 74.7 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.10.0

File hashes

Hashes for discord_py_interactions-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6316f7b592f02680ca688110a7babd12d195243fa3ba3ec096ec68ffc2a325af
MD5 8f83b9b4e1fab7f2a0e7660959fcdb48
BLAKE2b-256 a64502e8ac2a79af3338f96e1fe45988e4689706a3e4c1bbd5edd704c9686b5d

See more details on using hashes here.

Supported by

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