Skip to main content

A Python library with a simple and familiar interface for working with the official Rubika bot API

Project description

PyRubikaBotAPI

یک کتابخانه برای ساخت ربات‌های روبیکا با پایتون

نصب

pip install PyRubikaBotAPI

مثال ساده

from rubibot import RubiBot

bot = RubiBot("YOUR_TOKEN")

@bot.message_handler(commands=["start"])
def start(message):
    bot.send_message(message.chat_id, "سلام! خوش آمدید!")

bot.polling()

مثال پیشرفته تر

@bot.message_handler(content_types=['file'])
def handle(msg):
    file_id = msg.file.id
    file_url = bot.get_file(file_id)
    file = bot.download_file(file_url)
    with open('file.format', 'wb') as f
        f.write(file)
    # استفاده از فایل ارسالی

مستندات:

Rubika: https://rubika.ir/pyrubikabotapi GitHub: https://github.com/alireza-sadeghian/PyRubikaBotAPI

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

pyrubikabotapi-1.0.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

pyrubikabotapi-1.0.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file pyrubikabotapi-1.0.0.tar.gz.

File metadata

  • Download URL: pyrubikabotapi-1.0.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for pyrubikabotapi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 31791a60290d1e90cf3b0ea5ce13f7a51e8827fe788c255e0a55bf9b6d3381ff
MD5 b6f8e1ec76a2ec2210af34a5b640a5bd
BLAKE2b-256 d2819bf203a8afd30fab6266bbb06e5a4180adda3a2787738601bdc6cc029c7f

See more details on using hashes here.

File details

Details for the file pyrubikabotapi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyrubikabotapi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for pyrubikabotapi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd31d34b5f45a834bb44bb4ac2f9f7677463c1acf19d3a5ce19a088bb63a2223
MD5 2632119e3527c83ce2de624bee0e17a0
BLAKE2b-256 1f6f6aecfb7382f1b4c47b3f4cc23ec356a654317c65322c8b3194df53bbba56

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