Type Aliases¶
types
¶
JSON = dict[str, Any]
module-attribute
¶
JSON in key value pairs rather than a raw string.
Serialized = JSON | str | None
module-attribute
¶
Dataclass turned into a serialized dictionary.
Note
Can be partially or fully serialized depending on the structure.
HTTPResponse = JSON | str | None
module-attribute
¶
Raw HTTP response from a request.
Unset = _Unset()
module-attribute
¶
This field has not yet been set.
Meant to preserve nullibility in endpoint parameters.
RequiredPartField[T] = T | None
¶
This field requires a non-None value.
Equivalent Discord notation is name, type.
OptionalPartField[T] = T | None
¶
This field can be left blank.
If this field is None, it will be omitted from the request.
Equivalent Discord notation is name?, type.
RequiredNullablePartField[T] = T | None
¶
This field must be present in the request.
If this field is None, it will serialize as JSON null.
Equivalent Discord notation is name, ?type.
OptionalNullablePartField[T] = T | None
¶
This field can be left blank.
If this field is None, it will serialize as None (or JSON's null).
Equivalent Discord notation is name?, ?type.
RequiredParam[T] = T | _Unset | None
¶
This field must be present in the request.
If this field is None, it will be omitted from the request.
If this field is Unset, it will be omitted from the request.
Equivalent to Discord's parameters that are optional and nullable.
RequiredNullableParam[T] = T | _Unset | None
¶
This field must be present in the request.
If this field is None, it will serialize as JSON null.
If this field is Unset, it will be omitted from the request.
Equivalent to Discord's parameters that are optional and nullable.
OptionalNullableParam[T] = T | _Unset | None
¶
This field can be left blank.
If this field is None, it will serialize as JSON null.
If this field is Unset, it will be omitted from the request.
Equivalent to Discord's parameters that are optional and nullable.
OptionalParam[T] = T | _Unset | None
¶
This field can be left blank.
If this field is None, it will be omitted from the request.
If this field is Unset, it will be omitted from the request.
Equivalent to Discord's parameters that are optional.