Похожие чаты

I want to get all messages from the bot, ex:

msgs = await self.bot.get_messages(user_id) - It's not working

telethon.errors.rpcerrorlist.BotMethodInvalidError: The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot (caused by GetHistoryRequest)

GetHistoryRequest isn't working too, is it possible to get all chat history from bot?

3 ответов

27 просмотров

No. You need to save the message id as you receive the updates.

Zakhar-Petukhov Автор вопроса
Shrimadhav U K
No. You need to save the message id as you receiv...

That is, if I want to get all the photos that were sent to the bot, is it impossible?

You could workaround if you wish ms = [] i = 0 while True:     i += 1     for m in await client.get_messages(chat, ids=list(range(i * 50, (i + 1) * 50))):         if m:             ms.append(m)

Похожие вопросы

Обсуждают сегодня

I didn't promote anything. Although this IS the EOS chat. Are you low IQ?
Stonehenge
40
У меня это всегда вопрос вызывало.. Нафига писать код так, чтобы потом ошибки вылавливать?
Nik
44
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
всем привет. реально ли понять чем в процессе занята память? delphi/linux, процесс свой
Handatros
12
что за асемблер кста?
Shvabrikk Nya
19
Добрый день! Пробую отловить исключение EConvertError: function _TryTextToDouble(var DoubleVar: Extended; Text: String): Boolean; begin try DoubleVar := StrToFloat...
Kirill Filippenok
19
Или алса чистая?
theakella122 обладатель mi9t
27
You insist on manipulating the meaning of words for the benefit of your bags. How is that any different from what some people do in the other direction? Like the ones who cla...
Nenad [I won't dm you]
8
Makes sense. So the market conditions don't really affect the token users. What effect do token users have on the market?
Moonlander🌱
14
Dear Frax Finance community , I am a holder of the Frax Share (FXS) token, which I currently store in cold storage. Recently, I came across discussions in the Telegram channe...
Yelena
6
Карта сайта