Telegram Bot Api Client
Project description
tgclient
Telegram Api Client
Getting Started
Install
pip install tgclient
or
git clone https://github.com/negative23/tgclient.git
cd tgclient
python setup.py install
getupdates example
from tgclient import *
bot = TelegramBot("245100736:AAGpgrDLt1YNwsQxxxxxxxxxxxxxxxxxxxx")
@bot.message("text")
def text(message):
print(message)
# {'message_id': 6577, 'from': {'id': 68747297, ... ...
bot.run()
command handler
from tgclient import *
bot = TelegramBot("245100736:AAGpgrDLt1YNwsQxxxxxxxxxxxxxxxxxxxx")
@bot.command(r'^(/echo) (.*)')
def text(message, args):
# args[2] two argument of command
bot.sendMessage(message['chat']['id'], args[1])
bot.run()
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
tgclient-1.5.3.tar.gz
(6.3 kB
view details)
Built Distribution
tgclient-1.5.3-py3-none-any.whl
(13.2 kB
view details)
File details
Details for the file tgclient-1.5.3.tar.gz
.
File metadata
- Download URL: tgclient-1.5.3.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4211cc6961f0d6dad693c44d65943949ef9c75cd8daaf125f561c9a251862288
|
|
MD5 |
3b7efc77bf4bc8eab28bab458d99ff5a
|
|
BLAKE2b-256 |
a23c86e95ced403790bdfa89603d5932a5083318d764912def23d85b4db85e14
|
File details
Details for the file tgclient-1.5.3-py3-none-any.whl
.
File metadata
- Download URL: tgclient-1.5.3-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
17f9f1c4a2a1086d270e7cad69d9ca3ad2cfa640b899907044c330e06003333d
|
|
MD5 |
10ddf39e3dfe78ae083ec8a43d485196
|
|
BLAKE2b-256 |
9d779bb44ddeaf70ec257923e4d57d74c0b938e90d5d9be19042a943d4b8a9f6
|