gangsta
gangsta copied to clipboard
Bot is not replying
Hello bro, I watched the tutorial and write the ditto code, even copied yours, but the bot is able to read the messages but not able to reply. Kindly help
Please be more precise with your question. What did you do? What part of the code did you change?
I watched the video and used the code exactly, I didn't change anything. When I ran the server.py code I got an error
...
Traceback (most recent call last):
File "server.py", line 15, in
I watched the video and used the code exactly, I didn't change anything. When I ran the server.py code I got an error ... Traceback (most recent call last): File "server.py", line 15, in updates = updates["result"] TypeError: 'NoneType' object is not subscriptable i delete my file tree from the file part
I'm getting this same error anyone knows why?
It wasn't the authorization token it was an error within my PyCharm setting. Please make sure you have a cfg extension installed so your PyCharm IDE will read the file.
Following the error, this could also be related to a broken telegram response. Updates will look very empty in case of server errors. It can be empty, updates["ok"]
can be False
. (I have never seen ok or result not being in updates, although i check for those errors.)
Also, one user deleted their reply, but it was correct also. The line 24 in server.py
from_ = item["message"]["from"]["id"]
can break also, as ["message"]["from"] is optional. (It might be empty in redirected messages)