From b1f780b83f005f708362ca40d7e1ea3b0b8d3418 Mon Sep 17 00:00:00 2001 From: Astrea <25420078+AstreaTSS@users.noreply.github.com> Date: Tue, 8 Aug 2023 14:27:07 -0400 Subject: [PATCH 1/2] fix: properly fix component/modal callback (#1523) --- interactions/models/internal/application_commands.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/interactions/models/internal/application_commands.py b/interactions/models/internal/application_commands.py index b1461df2b..8ed71fddf 100644 --- a/interactions/models/internal/application_commands.py +++ b/interactions/models/internal/application_commands.py @@ -1170,7 +1170,6 @@ def component_callback(*custom_id: str | re.Pattern) -> Callable[[AsyncCallable] *custom_id: The custom ID of the component to wait for """ - resolved_custom_id: tuple[str | re.Pattern, ...] | list[str] = [] def wrapper(func: AsyncCallable) -> ComponentCommand: resolved_custom_id = custom_id or [func.__name__] @@ -1182,8 +1181,8 @@ def wrapper(func: AsyncCallable) -> ComponentCommand: name=f"ComponentCallback::{resolved_custom_id}", callback=func, listeners=resolved_custom_id ) - custom_id = _unpack_helper(resolved_custom_id) - custom_ids_validator(*resolved_custom_id) + custom_id = _unpack_helper(custom_id) + custom_ids_validator(*custom_id) return wrapper @@ -1203,7 +1202,6 @@ def modal_callback(*custom_id: str | re.Pattern) -> Callable[[AsyncCallable], Mo Args: *custom_id: The custom ID of the modal to wait for """ - resolved_custom_id: tuple[str | re.Pattern, ...] | list[str] = [] def wrapper(func: AsyncCallable) -> ModalCommand: resolved_custom_id = custom_id or [func.__name__] @@ -1213,8 +1211,8 @@ def wrapper(func: AsyncCallable) -> ModalCommand: return ModalCommand(name=f"ModalCallback::{resolved_custom_id}", callback=func, listeners=resolved_custom_id) - custom_id = _unpack_helper(resolved_custom_id) - custom_ids_validator(*resolved_custom_id) + custom_id = _unpack_helper(custom_id) + custom_ids_validator(*custom_id) return wrapper From 250770c3bbf95a078f0b67abb1010cd04e2cd77e Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Wed, 9 Aug 2023 04:27:59 +1000 Subject: [PATCH 2/2] chore: Bump version to 5.9.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 412c6a2b6..68778cfea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "interactions.py" -version = "5.9.1" +version = "5.9.2" description = "Easy, simple, scalable and modular: a Python API wrapper for interactions." authors = [ "LordOfPolls ",