A Telegram Bot made in Python, that can perform a variety of tasks, based on requests to certain APIs.
Report Bug
·
Request Feature
This is a Telegram Bot made with Python that uses python-telegram-bot wrapper which can perform a variety of tasks, like getting a random number, a random joke, cat and dog pictures, and also memes. It can easily be accessed by Telegram Users by opening this link: VitelBot.
This project is entirely built with the following components and languages:
The Telegram Bot can easily be accessed by opening this link: https://t.me/VijethsTestingBot. Telegram Users can then send queries to the bot by issuing listed commands. In order to build this bot manually, and get a local copy of the Python program up and running follow these simple steps.
Telegram App must be installed for this interacting with this Bot. First, grab an API key for your Telegram Bot by following these steps:
- Make sure you have an Telegram account. Start Telegram's BotFather Bot by opening this link: https://t.me/BotFather
- Issue /newbot command. The BotFather bot asks you the bot's name, its picture and other details. Enter them according to your needs.
- Finally BotFather issues an API key for the bot that you have created. Store the API key securely, and don't share it with anyone.
Next, to make the bot work, it needs to be programmed with this script. For that, Python>=3.7 and pip>=19.2 should be installed. After installation, check their versions using
python --version
pip --version
- Clone the repo
git clone https://github.com/vijethph/VitelBot.git
- Open the downloaded folder
cd VitelBot
- Install the packages listed in
requirements.txt
using the following command:
pip install -r requirements.txt
- Open
main.py
, replace TOKEN with your API key in single quotes, and MODE with 'dev', i.e.,
TOKEN = 'your-API-key'
MODE = 'dev'
- Finally run the program using
python main.py
The Bot can now be used by issuing commands to it.
Another way to install this app is to use it's Docker Image, which is available at DockerHub. Docker should be installed in your system. Just run these commands to pull the image and start the container:
docker pull vijethph/vitelbot
docker run -p 8443:8443 -e TOKEN='yourapikey' -e MODE='dev' vijethph/vitelbot
Where 'yourapikey'
should be replaced with your API key (with single quotes).
If you wish to deploy the bot to Heroku (so that it stays online all the time), simply click 'Deploy to Heroku'
badge shown above. You need to have a Heroku account for doing this. Then, in Heroku Dashboard, go to App settings, add these Environment Variables:
key : TOKEN, value : your-API-key
key : MODE, value : prod
When the bot is opened in Telegram, press Start. It will introduce itself. Users will see a list of commands that can be issued to the bot. All the commands begin with the prefix '/'. So press '/' to view the commands, and choose any one of them to get the required output.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU GPL License.
Vijeth P H - @vijethph
Project Link: https://github.com/vijethph/VitelBot
Made with ❤ in India.
If you like this project, please ⭐ this repo and share it with others 👍