vijethph / VitelBot

A Telegram bot made in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Status GitHub issues Contributors GitHub forks GitHub stars GitHub license made-with-python Docker Build Deploy


Logo

VitelBot

A Telegram Bot made in Python, that can perform a variety of tasks, based on requests to certain APIs.

Report Bug · Request Feature

Table of Contents

About The Project

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.

Built With

This project is entirely built with the following components and languages:

Getting Started

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.

Prerequisites

Telegram App must be installed for this interacting with this Bot. First, grab an API key for your Telegram Bot by following these steps:

  1. Make sure you have an Telegram account. Start Telegram's BotFather Bot by opening this link: https://t.me/BotFather
  2. Issue /newbot command. The BotFather bot asks you the bot's name, its picture and other details. Enter them according to your needs.
  3. 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

Installation

  1. Clone the repo
git clone https://github.com/vijethph/VitelBot.git
  1. Open the downloaded folder
cd VitelBot
  1. Install the packages listed in requirements.txt using the following command:
pip install -r requirements.txt
  1. Open main.py, replace TOKEN with your API key in single quotes, and MODE with 'dev', i.e.,
TOKEN = 'your-API-key'
MODE = 'dev'
  1. 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

Usage

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.

Contributing contributions welcome

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU GPL License.

Contact

Vijeth P H - @vijethph

Project Link: https://github.com/vijethph/VitelBot

Thank You!

Made with ❤ in India.

If you like this project, please ⭐ this repo and share it with others 👍

Acknowledgements

About

A Telegram bot made in Python

License:GNU General Public License v3.0


Languages

Language:Python 93.0%Language:Dockerfile 6.5%Language:Procfile 0.6%