pyrocketbot


Namepyrocketbot JSON
Version 1.0.5 PyPI version JSON
download
home_page
SummaryPython lib for create rocketchat bot with getupdate like TelegramBots
upload_time2023-09-09 14:16:24
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords rocketchat bot rocket.chat
VCS
bugtrack_url
requirements rocketchat-API
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RocketPyBot

## Python lib for create rocketchat bot with getupdate like TelegramBots
### This library is based on [rocketchat_API](https://github.com/jadolg/rocketchat_API)

### Installation

```bash
pip install pyrocketbot
```

### Usage

```python
import os
from pyrocketbot 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



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyrocketbot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "rocketchat,bot,rocket.chat",
    "author": "",
    "author_email": "\"SeYeD Mohammad Khoshnava | seyed.dev\" <me@seyed.dev>",
    "download_url": "https://files.pythonhosted.org/packages/a5/4f/f999a14ce26585309ba81ba0fec881ee2ee0042c220fbf9859b78327cd7a/pyrocketbot-1.0.5.tar.gz",
    "platform": null,
    "description": "# RocketPyBot\n\n## Python lib for create rocketchat bot with getupdate like TelegramBots\n### This library is based on [rocketchat_API](https://github.com/jadolg/rocketchat_API)\n\n### Installation\n\n```bash\npip install pyrocketbot\n```\n\n### Usage\n\n```python\nimport os\nfrom pyrocketbot import RocketBot\n\nusername = os.environ.get('ROCKET_USERNAME')\npassword = os.environ.get('ROCKET_PASSWORD')\nserver_url = os.environ.get('ROCKET_SERVER_URL')\n\nproxy_dict = {\n    \"http\"  : \"http://127.0.0.1:2080\",\n    \"https\" : \"https://127.0.0.1:2080\",\n}\n\nbot = RocketBot(username, password, server_url)\n# bot = RocketBot(username, password, server_url, proxy_dict=proxy_dict)\n\n\n@bot.command(r'/start')\ndef start(message, match_list):\n    bot.send_message(message['rid'], 'hi')\n\n@bot.command(r'/echo (.*)')\ndef echo(message, match_list):\n    bot.send_message(message['rid'], match_list[0])\n\n\nif __name__ == '__main__':\n    print('Bot started')\n    bot.run(chat_type='d', sleep=0.5)\n```\n\n### Note : \nin 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\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python lib for create rocketchat bot with getupdate like TelegramBots",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://github.com/seyed-dev/rocketchatbot"
    },
    "split_keywords": [
        "rocketchat",
        "bot",
        "rocket.chat"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4cbd4ff75e4a6963f08523eeae70a04ea913adef7cca5338258aabb716b89451",
                "md5": "13f6d3f22b7632e762844e48e0b2f9fb",
                "sha256": "41e67925d225765793557c90fb9d703ac0f9d6c250ecec99449b1a25aa789d61"
            },
            "downloads": -1,
            "filename": "pyrocketbot-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "13f6d3f22b7632e762844e48e0b2f9fb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 3019,
            "upload_time": "2023-09-09T14:16:22",
            "upload_time_iso_8601": "2023-09-09T14:16:22.608134Z",
            "url": "https://files.pythonhosted.org/packages/4c/bd/4ff75e4a6963f08523eeae70a04ea913adef7cca5338258aabb716b89451/pyrocketbot-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a54ff999a14ce26585309ba81ba0fec881ee2ee0042c220fbf9859b78327cd7a",
                "md5": "1b4f026e865ed97dafd92df3159c0e9a",
                "sha256": "60f2613fbee457bdd99c4f7433c1d91ae1475e4b83fd62714955da942d0edce3"
            },
            "downloads": -1,
            "filename": "pyrocketbot-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "1b4f026e865ed97dafd92df3159c0e9a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 2715,
            "upload_time": "2023-09-09T14:16:24",
            "upload_time_iso_8601": "2023-09-09T14:16:24.553079Z",
            "url": "https://files.pythonhosted.org/packages/a5/4f/f999a14ce26585309ba81ba0fec881ee2ee0042c220fbf9859b78327cd7a/pyrocketbot-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-09 14:16:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "seyed-dev",
    "github_project": "rocketchatbot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "rocketchat-API",
            "specs": [
                [
                    "==",
                    "1.28.1"
                ]
            ]
        }
    ],
    "lcname": "pyrocketbot"
}
        
Elapsed time: 0.11924s