Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Feb 6, 2024
1 parent 6da465b commit 007259d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deltabot_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def start(self) -> None:
def _init_cmd(cli: BotCli, bot: Bot, args: Namespace) -> None:
"""initialize the account"""

def on_progress(event: AttrDict) -> None:
def on_progress(bot: Bot, _accid: int, event: AttrDict) -> None:
if event.comment:
bot.logger.info(event.comment)
pbar.set_progress(event.progress)
Expand Down
2 changes: 1 addition & 1 deletion deltabot_cli/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def run_until(self, func: Callable[[AttrDict], bool], accid: int = 0) -> AttrDic
"""
self.logger.debug("Listening to incoming events...")
if accid:
self.rpc.start_io(accid)
if self.rpc.is_configured(accid):
self.rpc.start_io(accid)
self._process_messages(accid) # Process old messages.
else:
self.rpc.start_io_for_all_accounts()
Expand Down
2 changes: 1 addition & 1 deletion deltabot_cli/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ._utils import AttrDict
from .client import Bot
FilterCallback = Callable[["Bot", "AttrDict"], bool]
HookCallback = Callable[["Bot", "AttrDict"], None]
HookCallback = Callable[["Bot", int, "AttrDict"], None]
HookDecorator = Callable[[HookCallback], HookCallback]


Expand Down

0 comments on commit 007259d

Please sign in to comment.