Skip to content

Commit

Permalink
🐛 fix core dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Nov 9, 2024
1 parent d44747b commit 82430b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ async def catch(self, interface: DispatcherInterface):
return manager.get_component(interface.annotation)
if issubclass(interface.annotation, BasePluginConfig):
return self.service.config.plugin.get(interface.annotation)
if hasattr(interface.event, "context"):
context: Context = interface.event.context
if issubclass(interface.annotation, BotConfig):
if issubclass(interface.annotation, BotConfig):
context: Context = await interface.lookup_param("context", Context, None)
if context:
return next(
(bot for bot in self.service.config.bots if bot.ensure(context.account)), None # type: ignore
)
Expand Down
14 changes: 7 additions & 7 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 82430b7

Please sign in to comment.