Telegram bot api library in python
Project description
Telezhka
Telegram api library in python
Install
pip install --upgrade Telezhka
Simple usage
from Telezhka import Telegram
api = Telegram("883304628:ONTB4H2SAMPLEtext9m0g")
for event in api.listen():
if "message" in event and "text" in event.message:
if event.message.text == "/hello":
api.sendMessage(text="Hello :)", chat_id=event.message.chat.id)
Keyboard usage
from Telezhka import Keyboard
kb = Keyboard(resize_keyboard=True)
kb.add_button(text="hello")
kb.add_line({"text": "hello2"})
# Send message with keyboard
api.sendMessage(reply_markup=kb.compile(), text="Hello", chat_id=event.message.chat.id)
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
Telezhka-0.0.11.tar.gz
(2.6 kB
view details)
File details
Details for the file Telezhka-0.0.11.tar.gz
.
File metadata
- Download URL: Telezhka-0.0.11.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b37a0cfc359a613a97861d8424b627b94aae4db78a918987cbad4098865a39b |
|
MD5 | 9b2ca5dbfeee5890d9fe5bd64d63cf30 |
|
BLAKE2b-256 | d5c3684bc5d7482ce211dd32c31398b3b2bfbb0bf643880684a676aa6a23579c |