Skip to content

A simple and interactive Telegram chatbot built using Python. This bot responds to various user commands, provides information, and can be easily customized for different use cases, such as answering FAQs, retrieving data, or offering entertainment through text responses.

Notifications You must be signed in to change notification settings

akashch1512/Polling-Telegram-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Chatbot

A simple and interactive Telegram chatbot built using Python. This bot responds to various user commands, provides information, and can be easily customized for different use cases, such as answering FAQs, retrieving data, or offering entertainment through text responses.

Features

  • User-Friendly Commands: Responds to user inputs and various commands.
  • Modular Codebase: The code is organized to allow easy customization and expansion.
  • Easy Setup: Minimal setup required; simply add your Telegram bot token to get started.
  • Basic Error Handling: Handles common errors gracefully for a smoother user experience.

Prerequisites

  • Python 3.x
  • Telegram Bot Token: Obtain a token by creating a bot through BotFather on Telegram.

Installation

  1. Clone the repository:
    git clone https://github.com/akashch1512/telegram_chatbot.git
  2. Navigate to the project directory:
    cd telegram_chatbot
  3. Install the required packages:
    pip install -r requirements.txt
  4. Set up your Telegram bot token:
    • Open config.py (or wherever the bot token is defined).
    • Replace YOUR_TELEGRAM_BOT_TOKEN with your actual bot token.

Usage

  1. Run the bot:
    python bot.py
  2. Interact with the bot:
    • Open Telegram and find your bot by its username.
    • Send commands or messages to the bot to start interacting.

Customization

  • Commands: Add new commands by defining functions in bot.py and linking them with desired commands using the dispatcher.
  • Responses: Modify the bot's responses in each function to suit your needs.

Example Commands

  • /start - Initiates the bot and provides a welcome message.
  • /help - Lists available commands and their descriptions.
  • /example_command - Replace this with specific functionality you'd like to add.

Error Handling

The bot includes basic error handling to catch and log issues that may arise during execution. For further customization, add additional error handlers as needed.

Contributing

Feel free to contribute by submitting pull requests. If you encounter any issues, please open an issue in the repository.

About

A simple and interactive Telegram chatbot built using Python. This bot responds to various user commands, provides information, and can be easily customized for different use cases, such as answering FAQs, retrieving data, or offering entertainment through text responses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages