Skip to content

Commit bb7d6fb

Browse files
authored
refactor: set context back to required in gateway (#566)
* fix!: make context not required * fix!: remove requirement of reason in helper methods * Update gateway.py
1 parent 943c6ba commit bb7d6fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interactions/api/gateway.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def _dispatch_event(self, event: str, data: dict) -> None:
342342

343343
if _context.data._json.get("options"):
344344
for option in _context.data.options:
345-
__name, _value = self.__sub_command_context(option)
345+
__name, _value = self.__sub_command_context(option, _context)
346346
_name += f"_{__name}" if __name else ""
347347

348348
if _value:
@@ -399,7 +399,7 @@ def __contextualize(self, data: dict) -> object:
399399
return context(**data)
400400

401401
def __sub_command_context(
402-
self, data: Union[dict, Option], context: object = MISSING
402+
self, data: Union[dict, Option], context: object
403403
) -> Union[Tuple[str], dict]:
404404
"""
405405
Checks if an application command schema has sub commands

0 commit comments

Comments
 (0)