Skip to content

Commit

Permalink
fix bug await the calls to load_from_to
Browse files Browse the repository at this point in the history
  • Loading branch information
aahnik committed Jun 13, 2021
1 parent 3d47c46 commit 667b311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tgcf/bot/live_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def forward_command_handler(event):
except:
pass
config.CONFIG.forwards.append(forward)
config.from_to = config.load_from_to(event.client, config.CONFIG.forwards)
config.from_to = await config.load_from_to(event.client, config.CONFIG.forwards)

await event.respond("Success")
config.write_config(config.CONFIG)
Expand Down Expand Up @@ -76,7 +76,7 @@ async def remove_command_handler(event):
parsed_args = yaml.safe_load(args)
source_to_remove = parsed_args.get("source")
config.CONFIG.forwards = remove_source(source_to_remove, config.CONFIG.forwards)
config.from_to = config.load_from_to(event.client, config.CONFIG.forwards)
config.from_to = await config.load_from_to(event.client, config.CONFIG.forwards)

await event.respond("Success")
config.write_config(config.CONFIG)
Expand Down

0 comments on commit 667b311

Please sign in to comment.