bluenix2 / discord-typings Goto Github PK
View Code? Open in Web Editor NEWPython typings of all payloads that Discord sends as TypedDicts.
License: MIT License
Python typings of all payloads that Discord sends as TypedDicts.
License: MIT License
Discord often send "extra fields" in events over the gateway. An example of this can be seen here, I was unsure to if this was under the scope of this library.
Although the union of all event types will most likely be set to Any
for performance reasons of type checkers - which is why they were never created in the first place - it can still be useful when handling individual events to be able to specify their types.
For example, as I am implementing wumpy-cache
the typings of individual events is useful for each processor of an event.
If complete support was the aim, there would need to be two new types for each event, but for now it is probably easiest to only provide the d
type and encourage the use of the overarching DispatchEvent
type for the complete WebSocket message received over the gateway. This code should be placed in gateway.py
as it is still quite small, although the size of it will increase quite a lot after this change.
the key role_subscription_data
is missing from MessageData
Hello, so I'm not sure what's going on, but whenever I try to import MessageActivityData from discord_typings, I get this import error:
ImportError: cannot import name 'MessageActivityData' from 'discord_typings' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/discord_typings/__init__.py)
Nothing major, just letting you know there's no typings for the MODAL_SUBMIT
interaction that was added somewhat recently. There is InteractionModalResponseData
, but that isn't quite the same.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.