Skip to main content

A simple pyton telegram libary

Project description

nt-telegram-bot

Oddiy va minimal telegram bot uchun Python + requests asosidagi kutubxona.

from telegram.updater import Updater
from telegram.handlers import MessageHandler
from telegram.types import Update
from config import TOKEN

nt-telegram-bot sizga hech qanday qo‘shimcha murakkabliksiz, tozalangan interfeys orqali Telegram bot yaratish imkonini beradi.

⚙️ O‘rnatish

pip install tigram_nt_bot

🚀 Boshlang‘ich foydalanish

Quyidagi kod namunasi orqali botni ishga tushiring:

from telegram.updater import Updater
from telegram.handlers import MessageHandler
from telegram.types import Update
from config import TOKEN


def handle_message(update: Update):
    message = update.message

    if message.text:
        if message.text == '/start':
            message.reply_text(
                TOKEN,
                "assalomu alaykum. ECHO BOT"
            )
        else:
            message.reply_text(TOKEN, message.text)
    elif message.contact:
        pass
    elif message.photo:
        pass
    elif message.sickter:
        pass


updater = Updater(TOKEN)
dispatcher = updater.dispatcher

dispatcher.add_handler(MessageHandler(handle_message))
updater.start_polling()

📌 Xususiyatlar

  • Updater yordamida soddalashtirilgan polling
  • MessageHandler orqali barcha turdagi xabarlarni tutib olish
  • Update obyektiga qulay kirish

📣 Hissa qo‘shish

Pull request’lar mamnuniyat bilan qabul qilinadi. Agar xatolik topsangiz — Issue qoldiring.

📄 Litsenziya

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tigram_nt_bot-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tigram_nt_bot-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file tigram_nt_bot-0.1.0.tar.gz.

File metadata

  • Download URL: tigram_nt_bot-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for tigram_nt_bot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3050daaeb43a44aa450047a16499df3d8e52050ecf0ae863f650a769a797be9e
MD5 bf02e94dbad6563f66a493921d9dfd76
BLAKE2b-256 dd1bab8698149eb0be2598e9ab860ae2ed2dc6f8b7badb9f7ee272364627be96

See more details on using hashes here.

File details

Details for the file tigram_nt_bot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tigram_nt_bot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for tigram_nt_bot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f65ee696d81b976415fef6b85ad29403bb5571879c4960ae8b4494aa837abd6b
MD5 e3e7398366e6d9469cd2d8e9beab38f3
BLAKE2b-256 3c1532192d89daed17ea8451cc3dc31b65215878183331e9870a17c8e1826a97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page