Browse Source

Correct query in billing_popup_bridge_callback event

pull/10109/head
dolfies 5 months ago
parent
commit
558916039a
  1. 5
      discord/state.py
  2. 2
      discord/types/gateway.py
  3. 12
      docs/api.rst

5
discord/state.py

@ -101,6 +101,7 @@ from .audit_logs import AuditLogEntry
from .read_state import ReadState from .read_state import ReadState
from .tutorial import Tutorial from .tutorial import Tutorial
from .experiment import UserExperiment, GuildExperiment from .experiment import UserExperiment, GuildExperiment
from .metadata import Metadata
if TYPE_CHECKING: if TYPE_CHECKING:
from typing_extensions import Self from typing_extensions import Self
@ -2006,8 +2007,8 @@ class ConnectionState:
self.dispatch( self.dispatch(
'billing_popup_bridge_callback', 'billing_popup_bridge_callback',
try_enum(PaymentSourceType, data.get('payment_source_type', 0)), try_enum(PaymentSourceType, data.get('payment_source_type', 0)),
data.get('path'), data.get('path', ''),
data.get('query'), Metadata(data.get('query', {})),
data.get('state'), data.get('state'),
) )

2
discord/types/gateway.py

@ -497,7 +497,7 @@ class BillingPopupBridgeCallbackEvent(TypedDict):
payment_source_type: int payment_source_type: int
state: str state: str
path: str path: str
query: str query: Dict[str, str]
PaymentUpdateEvent = Payment PaymentUpdateEvent = Payment

12
docs/api.rst

@ -516,13 +516,17 @@ Billing
.. versionadded:: 2.0 .. versionadded:: 2.0
.. versionchanged:: 2.1
The type of the ``query`` parameter was corrected from ``str`` to ``Mapping[str, str]``.
:param payment_source_type: The payment source type. :param payment_source_type: The payment source type.
:type payment_source_type: :class:`PaymentSourceType` :type payment_source_type: :class:`PaymentSourceType`
:param path: The path of the callback. :param path: The URL path of the callback.
:type path: :class:`str` :type path: :class:`str`
:param query: The query of the callback. :param query: The URL query parameters of the callback.
:type query: :class:`str` :type query: Mapping[:class:`str`, :class:`str`]
:param state: The state of the callback. :param state: A hash to verify the callback.
:type state: :class:`str` :type state: :class:`str`
Entitlements Entitlements

Loading…
Cancel
Save