Skip to content

Commit

Permalink
update params
Browse files Browse the repository at this point in the history
  • Loading branch information
skar404 committed Jun 29, 2023
1 parent 1271b25 commit 1fcf8ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ async def looooooop():
.gino.all()
for p in pins:
try:
m = await app.get_messages(p.chat_id, p.message_id)
await m.unpin()
await app.unpin_chat_message(p.chat_id, p.message_id)
log.info(f'unpin_chat_message {p.chat_id=} {p.message_id=}')
except Exception as e:
log.exception('skip unpin ex=%s', e)
await p.update(on_delete=True).apply()
Expand All @@ -191,11 +191,11 @@ async def bot():
await context.db.set_bind(settings.db)
log.info('init db')

context.on_run = True
log.info('start app')

loop.create_task(looooooop())
await app.start()
context.on_run = True
log.info('start bot')
await idle()
await app.stop()
Expand Down

0 comments on commit 1fcf8ed

Please sign in to comment.