Skip to content

Commit 88da798

Browse files
authored
feat: add ApplicationContext.attachment_size_limit property
Signed-off-by: hich4t <[email protected]>
1 parent 554ecb1 commit 88da798

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

discord/commands/context.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@ def unselected_options(self) -> list[Option] | None:
268268
return self.command.options # type: ignore
269269
return None
270270

271+
@cached_property
272+
def attachment_size_limit(self) -> int | None:
273+
"""Returns the attachment size limit associated with this context's command.
274+
Shorthand for :attr:`.Interaction.attachment_size_limit`.
275+
"""
276+
return self.interaction.attachment_size_limit
277+
271278
@property
272279
@discord.utils.copy_doc(InteractionResponse.send_modal)
273280
def send_modal(self) -> Callable[..., Awaitable[Interaction]]:

0 commit comments

Comments
 (0)