Telegram Bot Python

Telegram Bot Python

A simple Python Telegram bot built using the telebot

Deploy Telegram Bot Python

telegram-bot-python

aeither/telegram-bot-python

Just deployed

Overview

This project is a simple Telegram bot built using the telebot library. It demonstrates the basic structure of a Telegram bot and uses Poetry for dependency management. The bot responds to commands and messages, and can be easily extended with additional functionality.

Key Features

  • Minimal Telegram bot application
  • Responds to '/start' and '/hello' commands
  • Echoes all other messages
  • Uses telebot for bot functionality
  • Uses Poetry for dependency management
  • Easy to understand and extend

Setup

pip install poetry
poetry install

Develop

To run the bot locally:

poetry run python -B main.py

Make sure to set up your .env file with your Telegram bot token:

TELEGRAM_BOT_TOKEN=your_token_here

Deploy

Initialize your project:

railway init

To deploy the bot on Railway:

railway up

Remember to set the TELEGRAM_BOT_TOKEN environment variable in your Railway project settings.TELEGRAM_BOT_TOKEN

Test

Open Telegram, start a chat with your bot, and try the commands /start or /hello. The bot will also echo any other messages you send.

Learn More


Template Content

telegram-bot-python

aeither/telegram-bot-python
Deploy Now

Details

John Fu Lin's Projects

Created on Jul 29, 2024

852 total projects

763 active projects

0% success on recent deploys

Python, Dockerfile

Bots



More templates in this category

View Template
waha

waha

WhatsApp API that you can run in a click


andresfiloso

View Template
Telegram JavaScript Bot

Telegram JavaScript Bot

A template for Telegram bot in JavaScript using grammY


Agampreet Singh's Projects

View Template
DiscordJS bot

DiscordJS bot

A basic Discord bot written in JavaScript


opqr's Projects