A powerful library designed for building bots on the Rubika platform.
Project description
ًں”§ Rubox
A powerful library designed for building bots on the Rubika platform.
ًں› Simple Example
from rubox import Client
from rubox.filters import commands
import asyncio
TOKEN = "BOT-TOKEN"
async def main():
async with Client(TOKEN) as app:
@app.on_message(commands(['start', 'help']))
async def start_handler(message):
await message.reply('Hello from Rubox!')
await app.run()
asyncio.run(main())
ًں‘¾ Minimal Example
from rubox import Client
import asyncio
TOKEN = "BOT-TOKEN"
async def main():
async with Client(TOKEN) as app:
await app.send_message('chat_id', 'Hello from **Rubox**!')
asyncio.run(main())
ًںŒگ Webhook Setup
from rubox import Client
from rubox.filters import commands
import asyncio
TOKEN = "BOT-TOKEN"
async def main():
async with Client(TOKEN, set_webhook=True) as app:
@app.on_message(commands(['start', 'help']))
async def start_handler(message):
await message.reply('Hello from Rubox!')
await app.run(
webhook_url='https://yourdomain.com',
path='/webhook',
host='0.0.0.0',
port=3000
)
asyncio.run(main())
ًں“¦ Installation
pip install -U rubox
rubika.ir/RubikaBox
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
rubox-0.2.0.tar.gz
(14.5 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
rubox-0.2.0-py3-none-any.whl
(15.4 kB
view details)
File details
Details for the file rubox-0.2.0.tar.gz.
File metadata
- Download URL: rubox-0.2.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b588af4a6c2fda77fed9db0eebc776ec4174fa2030cda8e89b24746206e9d439
|
|
| MD5 |
9cbcad3ba0e15eb58fab05b0ac0beef1
|
|
| BLAKE2b-256 |
e6e187289b07fde5589c104f10d8252c0bfd0b50a79ead8b8eff4bf1a2da6e96
|
File details
Details for the file rubox-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rubox-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08f3ebb11a98f0a505705662be6e38b7afaf5eb64bd032be5154199f11f38362
|
|
| MD5 |
3309f5c3018707ff9dea51bcf8240255
|
|
| BLAKE2b-256 |
c2fde421bb5870cb93b36eadc6b3c2f6b002e96107e46d9c1d2187cde5ca33f4
|