You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a simple example of a Telegram bot using the `python-telegram-bot` library in Python.
6
+
7
+
## Prerequisites
8
+
9
+
- `python-telegram-bot` library
10
+
11
+
You can install the required library using the following command:
12
+
13
+
```bash
14
+
pip install python-telegram-bot
15
+
```
16
+
17
+
## Description
18
+
19
+
This Telegram bot responds to user messages with a predefined message. It includes the following functionality:
20
+
21
+
- Responding to the `/start` command with a welcome message.
22
+
- Echoing back any other text messages sent by users.
23
+
24
+
## Setup
25
+
26
+
1. Create a new bot on Telegram using the BotFather and obtain the bot token.
27
+
2. Replace `'YOUR_BOT_TOKEN'` in the code (`telegram_bot.py`) with your actual bot token.
28
+
29
+
## Usage
30
+
31
+
1. Run the script using a Python interpreter:
32
+
33
+
```bash
34
+
python telegram_bot.py
35
+
```
36
+
37
+
2. Start a conversation with the bot on Telegram.
38
+
3. Use the `/start` command to receive a welcome message.
39
+
4. Send any other text message to receive an echo response.
40
+
41
+
## Customization
42
+
43
+
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.
0 commit comments