Python package to utilizes the telegram API to easily add commands and person other actions
Project description
TelegramBot
Project Description
This project uses the telegram bot API to create a bot service
Installation
To install with pip
$ pip install Telegram-Bot8
Usage
from TelegramBot8 import Message, TeleBot, Update, ParseMode
API_KEY = os.getenv('telegramApiKey')
bot = TeleBot(API_KEY)
@bot.add_command_helper(command="/hi")
def hi(message: Message):
bot.send_message(message.chat.getID(), "Hello")
@bot.add_command_menu_helper(command="/bye", description="Just testing added command")
def bye(message: Message):
bot.send_message(message.chat.getID(), "Bye")
@bot.add_regex_helper(regex="^hi$")
def regex(message: Message):
bot.send_message(message.chat.getID(), "Hello")
bot.poll()
Credits
Jeyavishnu |
License
Distributed under the MIT License. See LICENSE
for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Telegram-Bot8-0.2.6.tar.gz
(21.8 kB
view details)
Built Distribution
File details
Details for the file Telegram-Bot8-0.2.6.tar.gz
.
File metadata
- Download URL: Telegram-Bot8-0.2.6.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f33546eaa2663d27edb88c8396297f459498c59a9a53f82d97b9a3c4b2f635e |
|
MD5 | be68ceef077b42ecb3106a5a773b4c49 |
|
BLAKE2b-256 | 6b826d7efd0b1f3222b41de14fea2695d4021a2281422014810c10e9682a8d92 |
File details
Details for the file Telegram_Bot8-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: Telegram_Bot8-0.2.6-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fccbeb188fbd6b4f01a3ca3e3ed8fb36fcde47540dd34182da62ada6e767db9d |
|
MD5 | fdb9bfab0bbf945d14407aa6630c5b2b |
|
BLAKE2b-256 | 85c731892eb5044404cf2b5494e28aa17b84f3fb740fb2ac7a663d74210332a0 |