Skip to content

Commit

Permalink
Merge pull request #1524 from interactions-py/unstable
Browse files Browse the repository at this point in the history
5.9.2
  • Loading branch information
silasary authored Aug 8, 2023
2 parents 6e9c9fd + 250770c commit 125ead2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions interactions/models/internal/application_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__]
Expand All @@ -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


Expand All @@ -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__]
Expand All @@ -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


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down

0 comments on commit 125ead2

Please sign in to comment.