This application uses the PokéApi v2 and the Telegram Bot API to send subscribers information about a random Pokémon.
The Application requires Python v3.8. It may also work with a lower version.
This application requires the following modules:
- ThreadPool
- requests
- math
- os
- random
Those modules should have been installed alongside python. Therefore you will most probably not have to install any of them.
The setup of the application requires more manual actions because this application isn't really meant to be distributed.
First of all clone this repository in your desired location.
For https:
git clone https://github.com/GRcwolf/Telegram-Poke-Data.gitOr over ssh:
git clone git@github.com:GRcwolf/Telegram-Poke-Data.gitBoth of the above methods should work fine and you can chose the one you like best.
You need to create some files manually. Otherwise the program will crash while trying to open them.
You need the Key of your bot to send data over it. First create a bot using the official documentation.
Create a new file .key. This file should contain the token of your bot.
The file's content must not end in a new line at the end of the file. The only content of the file is the token and nothing else.
You need to create additional files to allow the application to store data.
First create a file .chats. This file is completely empty.
Afterwards create a file called .last_update. This file should contain 1 as text.
This file also can't have a line break at the end.
You can run the application with$
python poke_stuff.pyOn Linux or other systems with multiple python versions installed you may need to write
python3 poke_stuff.pyYou can also define this as a cron job if you like. This isn't a problem because the program does not require any user interaction while running.
You can get the information about the pokemon if you text your bot the command /subscribe (a simple text message).
The subscribers will receive the information about the pokemon when the application is executed.
You can also unsubscribe from the the list with the command /unsubscribe.
This section shows how the application works.
| File | Description |
|---|---|
| .chats | Contains the chat ids which are subscribed. (one for each line) |
| .key | Contains the token of your bot. |
| .last_update | Contains an integer defining the id of the last bot update call. |
For the functionality and the understanding of the, please refer to to python files themselves.
This diagram should provide an overview of how the program acts.
Here another more simplified view of the program's steps without the specific actors.

