All Templates / Bots
Telegram Bot Python
A simple Python Telegram bot built using the telebot
telegram-bot-python
aeither/telegram-bot-python
Just deployed
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.
pip install poetry
poetry install
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
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
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.
Template Content
telegram-bot-python
aeither/telegram-bot-pythonTELEGRAM_BOT_TOKEN
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
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY
Agampreet Singh's Projects
245