Skip to main content

Maintained typings of payloads that Discord sends

Reason this release was yanked:

The fix for 0.2.0 moved imports under TYPE_CHECKING but caused another NameError

Project description

discord-typings

Maintained typings of all payloads that Discord sends as TypedDicts.

Naming and usage

Right now there is no official documentation or API Reference - just start importing things and your editor will auto-complete options. This may change in the future though.

The naming used is the suffixes Data, Event and Command for the three types of payloads. Event refers to a gateway event received over the gateway, Command refers to a gateway command sent over the gateway and Data is used for any general top-level payloads like UserData.

The benefit of using Data as a suffix is that in your code you can use from discord_typings import UserData even if you define a User object (as is expected to be rather common).

Exceptions

To differentiate between the data for complete application commands, and the data Discord expects to receive to create an application command, there is a special-cased ApplicationCommandPayload.

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-typings-0.2.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

discord_typings-0.2.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file discord-typings-0.2.1.tar.gz.

File metadata

  • Download URL: discord-typings-0.2.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for discord-typings-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f919645ba23bb3bf09b470bc8a02f22cd9fd26e9e8b8198c95b59d53a814156b
MD5 981bf5fe7b9fcb6e5dc559d47c799f31
BLAKE2b-256 151cfa34d08603ec960c527eda6c8de98e66211a30602803fddc2574683407df

See more details on using hashes here.

Provenance

File details

Details for the file discord_typings-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for discord_typings-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9534de9e729cd655ab039ede0cc769dad4a5ff56719a685c4574442952cd0645
MD5 b1245638764c4f837999898534256927
BLAKE2b-256 adeaa6743ee365f97f802eb659e4d6f12d5b3b8249489dd376fc944d5742feb1

See more details on using hashes here.

Provenance

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