mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add Interaction.filesize_limit
This commit is contained in:
@ -154,6 +154,10 @@ class Interaction(Generic[ClientT]):
|
||||
The context of the interaction.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
filesize_limit: int
|
||||
The maximum number of bytes a file can have when responding to this interaction.
|
||||
|
||||
.. versionadded:: 2.6
|
||||
"""
|
||||
|
||||
__slots__: Tuple[str, ...] = (
|
||||
@ -172,7 +176,8 @@ class Interaction(Generic[ClientT]):
|
||||
'command_failed',
|
||||
'entitlement_sku_ids',
|
||||
'entitlements',
|
||||
"context",
|
||||
'context',
|
||||
'filesize_limit',
|
||||
'_integration_owners',
|
||||
'_permissions',
|
||||
'_app_permissions',
|
||||
@ -214,6 +219,7 @@ class Interaction(Generic[ClientT]):
|
||||
self.application_id: int = int(data['application_id'])
|
||||
self.entitlement_sku_ids: List[int] = [int(x) for x in data.get('entitlement_skus', []) or []]
|
||||
self.entitlements: List[Entitlement] = [Entitlement(self._state, x) for x in data.get('entitlements', [])]
|
||||
self.filesize_limit: int = data['attachment_size_limit']
|
||||
# This is not entirely useful currently, unsure how to expose it in a way that it is.
|
||||
self._integration_owners: Dict[int, Snowflake] = {
|
||||
int(k): int(v) for k, v in data.get('authorizing_integration_owners', {}).items()
|
||||
|
Reference in New Issue
Block a user