Skip to content

Commit

Permalink
fix: debug sendall
Browse files Browse the repository at this point in the history
  • Loading branch information
i007c committed Jun 18, 2023
1 parent 7314545 commit aef0a10
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bchat/modules/admin/sendall.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def sendall_job(ctx: Ctx):
target = UserModel(**U)

try:
msg_id = await ctx.bot.copy_message(
await ctx.bot.copy_message(
target.user_id, ctx.job.user_id, msg_id,
)
data['success'] += 1
Expand All @@ -81,7 +81,8 @@ async def sendall_job(ctx: Ctx):
UserTable.user_id == target.user_id,
blocked_bot=True
)
except NetworkError:
except NetworkError as e:
logging.error(str(e))
data['error'] += 1
except TelegramError as e:
logging.exception(e)
Expand Down Expand Up @@ -115,7 +116,7 @@ async def sendall_message(update: Update, ctx: Ctx):
chat_id=msg.chat.id,
user_id=update.effective_user.id,
data={
'msg_id': msg.message_id,
'msg_id': msg.id,
'limit': limit
},
name=JOB_ID
Expand Down

0 comments on commit aef0a10

Please sign in to comment.