RocketPyBot
Python lib for create rocketchat bot with getupdate like TelegramBots
Installation
pip install rocketpybot
Usage
import os
from rocketpybot import RocketBot
username = os.environ.get('ROCKET_USERNAME')
password = os.environ.get('ROCKET_PASSWORD')
server_url = os.environ.get('ROCKET_SERVER_URL')
proxy_dict = {
"http" : "http://127.0.0.1:2080",
"https" : "https://127.0.0.1:2080",
}
bot = RocketBot(username, password, server_url)
# bot = RocketBot(username, password, server_url, proxy_dict=proxy_dict)
@bot.command(r'/start')
def start(message, match_list):
bot.send_message(message['rid'], 'hi')
@bot.command(r'/echo (.*)')
def echo(message, match_list):
bot.send_message(message['rid'], match_list[0])
if __name__ == '__main__':
print('Bot started')
bot.run(chat_type='d', sleep=0.5)
Note :
in run method you can set chat_type to 'd' for direct message or 'c' for channel message and set sleep for sleep time per update
Metadata
Release files for rocketbotlib 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rocketbotlib-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for rocketbotlib-0.0.1-py3-none-any.whl |
Release files / rocketbotlib-0.0.1-py3-none-any.whl
| Download URL | rocketbotlib-0.0.1-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b94771797b23ab3dd615cbd2841097dce9726ae85132f3588378d4d6e793178b
|
|
BLAKE2b-256 checksum How to use checksums |
2b24f3d8221471f0df46a229f8c9d5e46d6d1cb8197f2f0b0f0bf1cb80787199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for rocketbotlib 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.