Skip to content

Files

Latest commit

 

History

History

Telegram Bot code

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
# Simple Telegram Bot Example

This repository contains a simple example of a Telegram bot using the `python-telegram-bot` library in Python.

## Prerequisites

- `python-telegram-bot` library

You can install the required library using the following command:

```bash
pip install python-telegram-bot

Description

This Telegram bot responds to user messages with a predefined message. It includes the following functionality:

  • Responding to the /start command with a welcome message.
  • Echoing back any other text messages sent by users.

Setup

  1. Create a new bot on Telegram using the BotFather and obtain the bot token.
  2. Replace 'YOUR_BOT_TOKEN' in the code (telegram_bot.py) with your actual bot token.

Usage

  1. Run the script using a Python interpreter:

    python telegram_bot.py
  2. Start a conversation with the bot on Telegram.

  3. Use the /start command to receive a welcome message.

  4. Send any other text message to receive an echo response.

Customization

You can customize and extend the bot's functionality according to your requirements. Refer to the python-telegram-bot documentation for more advanced features and options.

Author

Shivansh-Jain-github