Skip to content

Commit

Permalink
Merge pull request #97 from ibattus/master
Browse files Browse the repository at this point in the history
Updated wordcount
  • Loading branch information
athphane authored Aug 14, 2024
2 parents c9788c0 + 12e4ca7 commit d7a7f74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion userbot/plugins/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ async def word_count(bot: UserBot, message: Message):
words = Custom()
progress = await bot.send_message(message.chat.id, "`Processed 0 messages...`")
total = 0
async for msg in UserBot.iter_history(message.chat.id, 1000):

async for msg in bot.get_chat_history(message.chat.id, 1000):
total += 1
if total % 100 == 0:
await progress.edit_text(f"`Processed {total} messages...`")
Expand Down

0 comments on commit d7a7f74

Please sign in to comment.