From aa6c886267610aec24b5845121b62e61386309a7 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Fri, 22 Apr 2022 18:09:35 +0200 Subject: [PATCH 1/2] fix!: fix bug with event names for extensions --- interactions/client/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interactions/client/bot.py b/interactions/client/bot.py index 1062d066d..b824ca6a3 100644 --- a/interactions/client/bot.py +++ b/interactions/client/bot.py @@ -490,7 +490,7 @@ def __check_options(_option: Option, _names: list, _sub_command: Option = MISSIN if _option.name is MISSING: raise InteractionException(11, message="Options must have a name.") if _sub_command is not MISSING: - __indent = 8 if not _sub_groups_present else 12 + __indent = 12 if _sub_groups_present else 8 log.debug( f"{' ' * __indent}checking option '{_option.name}' of sub command '{_sub_command.name}'" ) @@ -1340,7 +1340,7 @@ def decorator(func: Coroutine): if func: # allows omitting `()` on `@listener` - func.__listener_name__ = func.__name__ + func.__listener_name__ = func.__name__ if not name else name return func return decorator From 4d0f35747e9ada71addaa6ee29895a084564ace2 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sun, 24 Apr 2022 21:50:50 +0200 Subject: [PATCH 2/2] Update interactions/client/bot.py Co-authored-by: Toricane <73972068+Toricane@users.noreply.github.com> --- interactions/client/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/client/bot.py b/interactions/client/bot.py index b824ca6a3..da1fa7fd9 100644 --- a/interactions/client/bot.py +++ b/interactions/client/bot.py @@ -1340,7 +1340,7 @@ def decorator(func: Coroutine): if func: # allows omitting `()` on `@listener` - func.__listener_name__ = func.__name__ if not name else name + func.__listener_name__ = name or func.__name__ return func return decorator