Skip to content

Commit 1155cf4

Browse files
authored
fix: Error starting when using scope param in command decorator (#1217)
1 parent 6cc7648 commit 1155cf4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

interactions/client/bot.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,11 +593,10 @@ def __resolve_commands(self) -> None: # sourcery skip: low-code-quality
593593
cmd.listener = self._websocket._dispatch
594594

595595
if cmd.default_scope and self._default_scope:
596-
cmd.scope = (
596+
if isinstance(cmd.scope, list):
597597
cmd.scope.extend(self._default_scope)
598-
if isinstance(cmd.scope, list)
599-
else self._default_scope
600-
)
598+
else:
599+
cmd.scope = self._default_scope
601600

602601
data: Union[dict, List[dict]] = cmd.full_data
603602
coro = cmd.dispatcher

0 commit comments

Comments
 (0)