Skip to content

Commit 23b0611

Browse files
EepyElvyraToricane
andauthored
fix!: fix possible bug with event names for extensions (#753)
* fix!: fix bug with event names for extensions * Update interactions/client/bot.py Co-authored-by: Toricane <73972068+Toricane@users.noreply.github.com> Co-authored-by: Toricane <73972068+Toricane@users.noreply.github.com>
1 parent a68d464 commit 23b0611

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interactions/client/bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def __check_options(_option: Option, _names: list, _sub_command: Option = MISSIN
490490
if _option.name is MISSING:
491491
raise InteractionException(11, message="Options must have a name.")
492492
if _sub_command is not MISSING:
493-
__indent = 8 if not _sub_groups_present else 12
493+
__indent = 12 if _sub_groups_present else 8
494494
log.debug(
495495
f"{' ' * __indent}checking option '{_option.name}' of sub command '{_sub_command.name}'"
496496
)
@@ -1340,7 +1340,7 @@ def decorator(func: Coroutine):
13401340

13411341
if func:
13421342
# allows omitting `()` on `@listener`
1343-
func.__listener_name__ = func.__name__
1343+
func.__listener_name__ = name or func.__name__
13441344
return func
13451345

13461346
return decorator

0 commit comments

Comments
 (0)