hrbot


Namehrbot JSON
Version 0.1.4 PyPI version JSON
download
home_page
SummaryThe hrbot is a wrapper on top of the HighRise Python Bot SDK that makes it easy to create bots in HighRise.
upload_time2023-07-18 06:03:03
maintainer
docs_urlNone
authorMuoDosta
requires_python>=3.10,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# The hrbot  
The hrbot is a wrapper on top of the [HighRise Python Bot SDK](https://github.com/pocketzworld/python-bot-sdk) that makes it easy to create bots in [HighRise](https://highrise.game/).  
  
Install the library:  
```shell  
pip install hrbot  
```  
# Features:  
- Quick and easy creation of an unlimited number of handlers for any event  
- FSM (finite state machine). Available storage in memory and Redis  
- Large number of available conditions in handlers  
- Web API support
# Unreleased features:
- Spam blocking bypass. Allows you to send an unlimited number of identical messages
# Example:  
```python  
from hrbot import Bot, Dispatcher  
from hrbot.types.hr import User  
  
dp = Dispatcher()  
bot = Bot(  
    api_key='',  
    room_id='',  
    dispatcher=dp  
)  
  
@dp.on_user_join()  
async def user_join(user: User):  
    """Triggers when a player joins a room"""  
    await bot.highrise.chat(f'Hi, {user.username}')  
  
@dp.on_user_leave()  
async def user_leave(user: User):  
    """Triggers when a player leaves the room"""  
    await bot.highrise.chat(f'Goodbye, {user.username}')  
  
@dp.on_chat(command='help', case_ignore=True, prefix='.!')  
async def help_command(user: User, message: str):  
    """Works for .help and !help messages. Not case-sensitive"""  
    await bot.highrise.chat("Some text for help command")  
  
@dp.on_chat()  
async def echo(user: User, message: str):  
    """Works for all chat messages"""  
    await bot.highrise.chat(message)
  
if __name__ == '__main__':  
    bot.start()  
```
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hrbot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "MuoDosta",
    "author_email": "MuoDostaWork@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/64/a9/752d1e911faa6526f5b0d66a0920c4e6e7e147620ad17cb89dc9c8412a03/hrbot-0.1.4.tar.gz",
    "platform": null,
    "description": "\n# The hrbot  \nThe hrbot is a wrapper on top of the [HighRise Python Bot SDK](https://github.com/pocketzworld/python-bot-sdk) that makes it easy to create bots in [HighRise](https://highrise.game/).  \n  \nInstall the library:  \n```shell  \npip install hrbot  \n```  \n# Features:  \n- Quick and easy creation of an unlimited number of handlers for any event  \n- FSM (finite state machine). Available storage in memory and Redis  \n- Large number of available conditions in handlers  \n- Web API support\n# Unreleased features:\n- Spam blocking bypass. Allows you to send an unlimited number of identical messages\n# Example:  \n```python  \nfrom hrbot import Bot, Dispatcher  \nfrom hrbot.types.hr import User  \n  \ndp = Dispatcher()  \nbot = Bot(  \n    api_key='',  \n    room_id='',  \n    dispatcher=dp  \n)  \n  \n@dp.on_user_join()  \nasync def user_join(user: User):  \n    \"\"\"Triggers when a player joins a room\"\"\"  \n    await bot.highrise.chat(f'Hi, {user.username}')  \n  \n@dp.on_user_leave()  \nasync def user_leave(user: User):  \n    \"\"\"Triggers when a player leaves the room\"\"\"  \n    await bot.highrise.chat(f'Goodbye, {user.username}')  \n  \n@dp.on_chat(command='help', case_ignore=True, prefix='.!')  \nasync def help_command(user: User, message: str):  \n    \"\"\"Works for .help and !help messages. Not case-sensitive\"\"\"  \n    await bot.highrise.chat(\"Some text for help command\")  \n  \n@dp.on_chat()  \nasync def echo(user: User, message: str):  \n    \"\"\"Works for all chat messages\"\"\"  \n    await bot.highrise.chat(message)\n  \nif __name__ == '__main__':  \n    bot.start()  \n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The hrbot is a wrapper on top of the HighRise Python Bot SDK that makes it easy to create bots in HighRise.",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b6abf3be51e7a6e9ce93f9d32460d2d9d37020273cec00d66de9aa623b3bd3e",
                "md5": "f4727ea2433aadcfbfe52e513422ad37",
                "sha256": "393704c520bfdedc4ec1186ace72c80416720bb34048f1063a4b8526f1c5d952"
            },
            "downloads": -1,
            "filename": "hrbot-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f4727ea2433aadcfbfe52e513422ad37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 11901,
            "upload_time": "2023-07-18T06:03:01",
            "upload_time_iso_8601": "2023-07-18T06:03:01.667658Z",
            "url": "https://files.pythonhosted.org/packages/4b/6a/bf3be51e7a6e9ce93f9d32460d2d9d37020273cec00d66de9aa623b3bd3e/hrbot-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64a9752d1e911faa6526f5b0d66a0920c4e6e7e147620ad17cb89dc9c8412a03",
                "md5": "cc9e30c5e82e387494589d57f0731e42",
                "sha256": "e7b4e7d641f0c9d769f4b28bc4a5bafa716d19f614584f0df3cd51676d807755"
            },
            "downloads": -1,
            "filename": "hrbot-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "cc9e30c5e82e387494589d57f0731e42",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 12309,
            "upload_time": "2023-07-18T06:03:03",
            "upload_time_iso_8601": "2023-07-18T06:03:03.659469Z",
            "url": "https://files.pythonhosted.org/packages/64/a9/752d1e911faa6526f5b0d66a0920c4e6e7e147620ad17cb89dc9c8412a03/hrbot-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-18 06:03:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "hrbot"
}
        
Elapsed time: 0.49465s