Python-telegram-bot not working

Hi, can someone have a look at my replit- https://replit.com/@footytrade2021/testtelegram#main.py

for some strange reason i get the below error when trying to run the telegram bot.

Code was working perfectly fine until recently.

main.py:5: RuntimeWarning: coroutine ‘Bot.send_message’ was never awaited
bot.send_message(chat_id=chat_id, text=message)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

That’s a warning, not an error… Could something else be causing it to break? Also, this should probably be in Python .

2 Likes

Thanks @9pfs , the thing is i cant get the code to execute the send message method.

Maybe a nice answer from stackoverflow will help you

https://stackoverflow.com/questions/75116947/how-to-send-messages-to-telegram-using-python

404: Not found on the link.

However, try viewing the line of code that the error specifies, and begin it with await. This has come up a lot in my Discord bots.