Skip to content

Commit a14652e

Browse files
authored
fix: wrong check condition in the component callback (#1352)
1 parent f32d8cc commit a14652e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/models/internal/application_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def wrapper(func: AsyncCallable) -> ComponentCommand:
11441144
return ComponentCommand(name=f"ComponentCallback::{custom_id}", callback=func, listeners=custom_id)
11451145

11461146
custom_id = _unpack_helper(custom_id)
1147-
if not all(isinstance(i, re.Pattern) for i in custom_id) or all(isinstance(i, str) for i in custom_id):
1147+
if not (all(isinstance(i, re.Pattern) for i in custom_id) or all(isinstance(i, str) for i in custom_id)):
11481148
raise ValueError("All custom IDs be either a string or a regex pattern, not a mix of both.")
11491149
return wrapper
11501150

0 commit comments

Comments
 (0)