Skip to content

WatchDogsDev/inline-post-telegram-bot

Repository files navigation

inline-post-telegram-bot

A bot for posting to your Telegram channel with inline buttons.

Official Bot

https://t.me/channel_inline_post_bot

Features

  • Create posts with inline buttons
  • Easy-to-use inline interface
  • Supports all message formats, links and media
  • Privacy-friendly

Requirements

  • Python 3.11+
  • Poetry for dependency management
  • A Telegram Bot API token

Installation

Clone the repository:

git clone https://github.com/WatchDogsDev/inline-post-telegram-bot.git
cd inline-post-telegram-bot

Install dependencies using Poetry:

poetry install

Configuration

  1. Copy the .env.template file to .env:
cp .env.template .env
  1. Fill in the required environment variables in .env:
    • INLINE_POST_BOT_TOKEN: Your Telegram Bot API token from BotFather

Development

Activate the virtual environment:

poetry shell

Run the bot:

python src/main.py

Deployment

Docker Deployment

Build and run the Docker container:

  1. Ensure Docker and Docker Compose are installed

  2. Configure your .env file from .env.template

# Build the image
docker build -t inline-post-bot .

# Or use Docker Compose
docker-compose up --build

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: Add amazing-feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Troubleshooting

  • Ensure all environment variables are correctly set
  • Check Poetry and Python versions compatibility
  • Verify Telegram Bot API token is correct

License

This project is licensed under the MIT License. See LICENSE for details.

Contact