{ "info": { "author": "Jorge Alberto D\u00edaz Orozco", "author_email": "diazorozcoj@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# REST API based bot for [Rocket.Chat](http://rocket.chat)\n\n## Install\n\n`pip install RocketChatAPIBot`\n\n## Usage\n\n### Create new bot\n\n```python\nimport os\nfrom RocketChatBot import RocketChatBot\n\nbotname = os.environ['BOTNAME']\nbotpassword = os.environ['BOTPASSWORD']\nserver_url = os.environ['BOT_URL']\n\nbot = RocketChatBot(botname, botpassword, server_url)\n```\n\n### Send message to channel\n\n`bot.send_message('starting bot...', channel_id='GENERAL')`\n\n### Direct message handler\n\nGets triggered when sentence starts with the botname like '@botname echo hello'\n\n```python\ndef greet(msg, user, channel_id):\n bot.send_message('hello @' + user, channel_id)\n\nbot.add_dm_handler(['hey', 'hello', ], greet)\n```\n\nReceives a list of keywords to trigger the command and the method to execute. The method should receive as parameters always msg as the message, user and channel_id\n\n### Auto answer handler\n\nGets triggered with the mention of keywords. Only made to respond with simple text, no functions.\n```python\nbot.add_auto_answer(['good news', 'i have good news', ], ['hell yeah!', 'tell me, tell me!', 'you are already good news ;)', ])\n\n```\n\n### Direct answer handler\n\nGets triggered when sentence starts with the name of the bot and keywords are in the sentence like '@botname who are you?'\n```python\nbot.add_direct_answer(['who are you?', 'what is your name?', ], ['I am botname', ])\n```\n\n### Handle unknow commands\n\n```python\nbot.unknow_command = ['I do not know what you want me to do...', 'I\\'m almost sure I\\'m not programmed to do that', 'I have no idea how to do that so here is a hug :hugging:']\n```\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jadolg/RocketChatBot", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "RocketChatAPIBot", "package_url": "https://pypi.org/project/RocketChatAPIBot/", "platform": "", "project_url": "https://pypi.org/project/RocketChatAPIBot/", "project_urls": { "Homepage": "https://github.com/jadolg/RocketChatBot" }, "release_url": "https://pypi.org/project/RocketChatAPIBot/0.1.2/", "requires_dist": [ "rocketchat-API" ], "requires_python": "", "summary": "REST API based bot for Rocket.Chat", "version": "0.1.2" }, "last_serial": 4968917, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "eb7926484743ba4cc9b61c2c08bf7c37", "sha256": "4d268515a3e7934a8d44ffaa6c40430f4fda173323ce1cb12c008e5672568cc7" }, "downloads": -1, "filename": "RocketChatAPIBot-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb7926484743ba4cc9b61c2c08bf7c37", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4778, "upload_time": "2018-02-02T16:01:48", "url": "https://files.pythonhosted.org/packages/f9/ad/54edafc3aac3292732ae2a6e037cd6182cb83d9162a2d5592b3c7f0efe66/RocketChatAPIBot-0.1-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2ee32a63c3a26f7c24a9ff9de65e2eb8", "sha256": "6298461273f8728cf9096060840ca52544baae270e35a94eb3a1af814a43a5bb" }, "downloads": -1, "filename": "RocketChatAPIBot-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2ee32a63c3a26f7c24a9ff9de65e2eb8", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4805, "upload_time": "2018-02-02T17:10:26", "url": "https://files.pythonhosted.org/packages/f9/3e/b664b8f14ab022aadc91cb6caa40d7d19cf6c3fdea27bb2f29fa1d45d3a9/RocketChatAPIBot-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7059f1b73b25d973519063654d9712d9", "sha256": "b8e2fb9ce6d40ba31491997d4680833d97658e49f4c300c3f71eacdbc0cf37a2" }, "downloads": -1, "filename": "RocketChatAPIBot-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7059f1b73b25d973519063654d9712d9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4159, "upload_time": "2019-03-21T16:25:13", "url": "https://files.pythonhosted.org/packages/dc/99/5fc918291cafc67595b574d2a34b2c0d0194e78bf3831deeda908d7000a5/RocketChatAPIBot-0.1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7059f1b73b25d973519063654d9712d9", "sha256": "b8e2fb9ce6d40ba31491997d4680833d97658e49f4c300c3f71eacdbc0cf37a2" }, "downloads": -1, "filename": "RocketChatAPIBot-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7059f1b73b25d973519063654d9712d9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4159, "upload_time": "2019-03-21T16:25:13", "url": "https://files.pythonhosted.org/packages/dc/99/5fc918291cafc67595b574d2a34b2c0d0194e78bf3831deeda908d7000a5/RocketChatAPIBot-0.1.2-py2.py3-none-any.whl" } ] }