Python Telegram Bot
Project description
PyTgram_bot
Updater -- telegram serviriga borib bir qancha updateni olib keladi qisqa qilib aytganda oxirgi updatelarni olib keladi
Dispatcher -- updater ustida amal bajaradi
Handler -- xabar kelsa hal qilish
Types - Message, MyChatMember
nt_PyTgram_bot
nt_PyTgram_bot — bu python-telegram-bot kutubxonasi asosida Telegram botlar yaratishni soddalashtirish uchun yozilgan modul.
Xususiyatlar
- Telegram API bilan oddiy interfeys
- Botga xabarlar va komandalarni yozish oson
- Moslashtirilgan
Updater,Handlerfunksiyalari
O'rnatish
pip install nt_PyTgram_bot
## Foydalanish misoli
```python
from PyTgram_bot.updater import Updater
from PyTgram_bot.handler import MessageHandler
from PyTgram_bot.message_types import Update
import requests
from config import TOKEN
def handle_message(update: Update):
chat_id = update.message['from']['id']
text = update.message['text']
requests.get(
url=f'https://api.telegram.org/bot{TOKEN}/sendMessage',
params={
'chat_id': chat_id,
'text': f"Siz yubordingiz: {text}"
}
)
updater = Updater(TOKEN)
updater.dispatcher.add_handler(MessageHandler(handle_message))
updater.start_polling()
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
nt_pytgram_bot-0.1.0.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nt_pytgram_bot-0.1.0.tar.gz.
File metadata
- Download URL: nt_pytgram_bot-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a09b4ae2d122bfa67ac90aa0c9d14155f230d3199ca7c397bb331012f2252ec6
|
|
| MD5 |
d11174a2556c114342bfdd7a219fee11
|
|
| BLAKE2b-256 |
330e8d8a1a86dc189678148c500eeb7de3c5b39c22d0ead5f21b789b00b2d32b
|
File details
Details for the file nt_pytgram_bot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nt_pytgram_bot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f71c4762e5702e04790d267919452aaa39a21bc68636da1d8c751f29c68a9f
|
|
| MD5 |
dde40091fe897b843b62459c5fb5a2fc
|
|
| BLAKE2b-256 |
584cd3ea3d6a8087fd479b708d7c7d8c435b624590ddbc603953fe6d71eabfa3
|