0

So, when i try to

await bot.get_messages(CHAT_ID, MESSAGE_ID)

i get OverflowError: int too big to convert.

Both CHAT_ID and MESSAGE_ID are int. Any ideas?

Expected

await app.get_messages(CHAT_ID, MESSAGE_ID) returns types.Message

  • Please include how you define the `CHAT_ID`. – doneforaiur Aug 05 '23 at 09:42
  • One possible cause of this error is that the values of CHAT_ID and/or MESSAGE_ID are too large to be represented as 32-bit signed integers. You can check if this is the case by printing their values and verifying if they are within the range of a 32-bit signed integer (-2147483648 to 2147483647). If the values of CHAT_ID and/or MESSAGE_ID are indeed too large, you may need to use a different method or library that can handle larger integer values. – Karim Baidar Aug 05 '23 at 09:48
  • @doneforaiur `CHAT_ID = -801109120` – NaZZaR4iK Aug 05 '23 at 09:59
  • Oops, forgot to ask the `MESSAGE_ID`. CHAT_ID seems fine. – doneforaiur Aug 05 '23 at 10:02

0 Answers0