Skip to content

telebotpy is a Python package that simplifies the process of sending text messages, images, and documents to Telegram channels.

License

Notifications You must be signed in to change notification settings

randhana/telebotpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

telebotpy: A Python Package for Sending Telegram Messages, Images, and Documents

telebotpy is a Python package that simplifies the process of sending text messages, images, and documents to Telegram channels. It provides an easy-to-use interface for interacting with the Telegram Bot API, allowing you to integrate Telegram messaging into your Python projects effortlessly.

Features

  • Send text messages to Telegram channels.
  • Send images to Telegram channels with optional captions.
  • Send documents (files) to Telegram channels with optional captions.

Installation

  1. Clone the project to your local machine:
git clone https://github.com/randhana/telebotpy.git
  1. Copy the telebotpy folder from the cloned project to your own project folder. Import the module in your Python script:
from telebotpy.telebot import TelegramBot

Usage

Here's how you can use telepy to send a text message to a Telegram channel:

from telebotpy.telebot import TelegramBot

# Replace 'YOUR_TOKEN' and 'YOUR_CHAT_ID' with your actual values
bot = TelegramBot(token="YOUR_TOKEN", chat_id="YOUR_CHAT_ID")
bot.send_text_message("This is a test message.") 
#send messages with Markdown formatting
bot.send_text_message("*Bold* _italic_ [website](https://example.com)") 
bot.send_video('video.mp4', "Video_caption")
bot.send_document('document.txt', 'Document_caption')

Contributing

We welcome contributions from the community. If you have any suggestions, bug reports, or would like to contribute to the development of telepy, please visit our GitHub repository and open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

About

telebotpy is a Python package that simplifies the process of sending text messages, images, and documents to Telegram channels.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages