Rubx Library For Rubika Iranina Messenger
Project description
rubika client | python 3
Document
•
Telegram
•
Rubika
•
روبیکس | روبیکا
Rubx | Rubika
Messenger:
from rb import StartClient
with StartClient('session') as client:
client.send_message('Hello From Rubx', 'chat-guid')
Or
from rb import StartClient as Client
def respond(callable, params) -> dict:
return callable(**params)
with Client(...) as client:
print(
respond(
client.send_message,
dict(
chat_id=...,
text='**Hey** @User@ R U __My__ ``Friend`` and ~~My Love~~'
mention_user_ids=['u0...]),
)
)
# print(respond(client.send_message, dict(chat_id=..., sticker=True, emoji_character='😜', sticker_id=..., )))
Rubino
from rb import RubinoClient
with RubinoClient('session') as app:
app.create_page(...)
Handler
Handler Examples
from rb import Handler, EventBuilder, Filters
client = Handler(...)
# handlers: HandShake, ChatsUpdates, MessagesUpdates
client.add_event_handling(func='ChatsUpdates', events=dict(get_chats=True, get_messages=True, pattern=('/start', 'Hey from rubx lib.')))
@client.handler
def hello(app, message: EventBuilder, event):
# to print message: print(message) or print(event)
# to use all methods: app.create_objcet_voice_chat(...)
message.respond(message.pattern, Filters.author) # filters: chat, group, channel, author
Or
from rb import Handler, NewMessage, Filters, EventBuilder, Performers
client = Handler(...)
@client.on(NewMessage(client.handle, handle_name=Performers.chats_updates))
def update(event: EventBuilder):
... # event.respond('Hey', Filters.chat)
Or
from rb import Handler, Filters, Performers
client = Handler('session')
def event(message):
message.respond(message.pattern, Filters.author)
client.add_event_handling(func=Performers.hand_shake, events=dict(get_chats=True, get_messages=True, pattern=('/start', 'Hi from rubx lib.')))
client.start = True
client.command_handler(event)
to using HandShake(WebSocket):
from rb import Handler, EventBuilder, Filters, Performers
client = Handler('abc...', 'u0...')
client.add_event_handling(func=Performers.hand_shake, events=dict(get_messages=True, get_chats=False))
@client.handler
def update(app, update, event):
if update.message.text == '/start':
message.reply(text='Hello my dear', chat_id=update.message.author_object_guid, reply_to_message_id=update.message.message_id)
# or using repond: message.respond('Hey!', Filters.author)
docs coming soon ...
INSTALLING
pip install rubx
UPGRADE
pip install rubx --upgrade
CREATED BY:
- saleh | rubika.ir/TheServer
self rubika client with python3 RUBX module
.. rubika library ..
view in github :
the special:
- [RUBX] > a library or module 'official' for rubika messnger with client server from iran ! for all .
- [RUBX] > full method and all methods rubika !
- [RUBX] > use api's rubika for you .
نیاز مندد حمایت و استار های شما :), از صفحه گیت هاب این پروژه دیدن کنید و استار بدید.
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
rubx-10.3.1.tar.gz
(47.9 kB
view hashes)
Built Distribution
rubx-10.3.1-py2.py3-none-any.whl
(50.1 kB
view hashes)
Close
Hashes for rubx-10.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90f8d5dbe8743675404ac07c329b7184bad48b66207d5c78636ae55283d9ef22 |
|
MD5 | 22b7d76b62f07970d038895d3dddf060 |
|
BLAKE2b-256 | b661e6277b4972efd7e2d28309389b870957002d56ec3ee9ab140544f0fdfb25 |