From 68a5a39efba64a573cb446942b28c343246d424a Mon Sep 17 00:00:00 2001 From: ibattus <59624896+ibattus@users.noreply.github.com> Date: Wed, 14 Aug 2024 11:54:27 +0500 Subject: [PATCH] Updated wordcount iter_history doesn't exist anymore? --- userbot/plugins/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userbot/plugins/metrics.py b/userbot/plugins/metrics.py index fb231d4a..c563af3d 100644 --- a/userbot/plugins/metrics.py +++ b/userbot/plugins/metrics.py @@ -13,7 +13,7 @@ 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 bot.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...`")