Emperor-One / Hamster-Key-Telegram-Bot

Your very own Telegram Bot to generate Hamster Kombat Keys for all available games. It will be updated for new games coming out.
GNU General Public License v3.0
15 stars 9 forks source link

Server issue #2

Closed kingbasitoo closed 3 months ago

kingbasitoo commented 3 months ago

2024-08-17 09:02:38 | INFO | 106 - Server is running. Awaiting users... Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/_bot.py", line 776, in initialize await self.get_me() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/ext/_extbot.py", line 1920, in get_me return await super().get_me( ^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/_bot.py", line 908, in get_me result = await self._post( ^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/_bot.py", line 622, in _post return await self._do_post( ^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/ext/_extbot.py", line 355, in _do_post return await super()._do_post( ^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/_bot.py", line 651, in _do_post result = await request.post( ^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/request/_baserequest.py", line 200, in post result = await self._request_wrapper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/request/_baserequest.py", line 379, in _request_wrapper raise InvalidToken(message) telegram.error.InvalidToken: Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/data/data/com.termux/files/home/Hamster-Key-Telegram-Bot/bot.py", line 133, in application.run_polling() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/ext/_application.py", line 881, in run_polling return self.__run( ^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/ext/_application.py", line 1079, in __run loop.run_until_complete(self.initialize()) File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/ext/_application.py", line 503, in initialize await self.bot.initialize() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/ext/_extbot.py", line 301, in initialize await super().initialize() File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/telegram/_bot.py", line 778, in initialize raise InvalidToken(f"The token {self._token} was rejected by the server.") from exc telegram.error.InvalidToken: The token <PASTE YOUR TELEGRAM BOT TOKEN HERE> was rejected by the server. ~/Hamster-Key-Telegram-Bot $

Emperor-One commented 3 months ago

You need to go to @BotFather on telegram and do /newbot. It will give you your token. THen you have to open the bot.py file with nano or vim and past your Token where it says <PASTE YOUR TELEGRAM BOT TOKEN HERE>