This telegram bot searches UNET's students data, using diferents commands and a messages handlers, and consume a Rest API that stores all data in MongoDB cloud.
1- Clone this project, on your local machine:
$ git clone https://github.com/jefferson10147/unet-bot
2- Create a virtual env inside the folder:
$ python3.x -m venv your_venv
3- Activate env:
$ source your_env/bin/activate
4- Install dependencies:
$ pip install -r requirements.txt
5- Create and export variables to .env file:
$ touch .env
$ echo "bot_token=your_bot_token" > .env
You generate bot token by creating a new bot with @botfather
7- Run your bot:
$ python3.x bot.py
-
Search student information just by sending into the chat student's names or lastnames, if there are more that one student with that condition, the bot will send the best results, just like a search engine.
-
If Sending student's dni to bot chat, it will search the information.
-
You can use bot commands, that are define:
- /name < student_name >
- /second_name < student_second_name >
- /lastname < student_lastname >
- /second_lastname < student_second_lastname >
- /lastname < student_lastname >
- /name_lastname < student_name > < student_lastname >
- /dni < student_dni >
The bot cosumes a API currently running at Heroku cloud. Visit Home page. See online documentation at DOC
You can try this bot at @unetpicbot
To my friend Pedro Labrador who created the main idea and created the first version of this bot. He is @PedroLabrador at telegram.