Skip to content

Commit

Permalink
fix trigger call
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfcabral committed Apr 3, 2024
1 parent 1358e57 commit f6a7c5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion botgen/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async def trigger(self, event: str, bot_worker: BotWorker, message: BotMessage):
""" """
if event in self._events:
for ev in self._events[event]:
handler_result = await ev(bot_worker, bot_worker, message)
handler_result = await ev(bot_worker, message)

if handler_result:
break
Expand Down
2 changes: 1 addition & 1 deletion tests/botgen/core_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async def test_trigger_with_registered_event_handler(bot, mock_bot_worker, mock_
await bot.trigger("some_event", mock_bot_worker, mock_bot_message)

# Assertions
mock_event_handler.assert_called_once_with(mock_bot_worker, mock_bot_worker, mock_bot_message)
mock_event_handler.assert_called_once_with(mock_bot_worker, mock_bot_message)


@pytest.mark.asyncio
Expand Down

0 comments on commit f6a7c5b

Please sign in to comment.