{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Communications", "Topic :: Communications :: Chat", "Topic :: Internet", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# Botter - Simple interface for creating cross-messenger bots\n\n**Botter** is a framework which allows your bots run in any available messenger.\nCurrently, there are only one implementation for [Discord](https://discord.app),\nbut it is easy to implement other platforms.\n\nOkay, let's get started!\n\n## Getting Started\n\n### Creating an Application\nAt first, you should register a bot in the desired platform.\nAs all messengers provide different ways to do so, we will not describe this process here.\n\n### Create Handler\nBotter uses event-based architecture, with a most-common event - `MessageEvent`.\nEvents are handled by `EventHandler`'s.\n\nSo, let's create out own:\n```python\nfrom botter.api import *\nfrom botter.api.handlers import *\n\nclass SimpleEchoHandler(ReplyHandler):\n async def handle_message(self, message: InboundMessage) -> Message:\n return Message(f\"You've said:\\n\" + message.text)\n```\n\nHere we use the `ReplyHandler`, which:\n - Nests `MessageHandler`\n - Checks the event is `MessageEvent`\n - Calls method `handle_message()` with the message from event.\n - If this method returns `Message` rather than None,\n`ReplyHandler` would send it to server with a mention to the original message's author.\n\n### Crate a Bot\nThen we need to create a `Bot` - object that aggregates handlers and mappings to the implementation.\nHere we use discord driver as an example.\n```python\nfrom botter.discord import DiscordBot\n\nclass EchoBot(Bot[DiscordBot]):\n token = 'INSERT_YOUR_TOKEN_HERE'\n event_handlers = [ SimpleEchoHandler ]\n client = DiscordBot(token=token)\n```\n\nOkay, let's try it out!\n\n![Simple EchoBot - Discord](/docs/static/echo-1-discord.png)\n\nWow! It works!\n\n### Extending Events\nNow, let's try to have some fun with the events.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/Hares/botter", "keywords": "", "license": "BSD 2-Clause License", "maintainer": "", "maintainer_email": "", "name": "botter", "package_url": "https://pypi.org/project/botter/", "platform": "", "project_url": "https://pypi.org/project/botter/", "project_urls": { "Homepage": "https://gitlab.com/Hares/botter" }, "release_url": "https://pypi.org/project/botter/0.0.6/", "requires_dist": [ "dataclasses (>=0.6)", "dataclasses-json (>=0.2.13)", "discord.py (>=1.2.3) ; extra == 'discord'", "python-telegram-bot (>=12.0.0b1) ; extra == 'telegram'", "functional-python (>=0.0.1) ; extra == 'telegram'", "python-telegram-bot (>=12.0.0b1) ; extra == 'all'", "functional-python (>=0.0.1) ; extra == 'all'", "discord.py (>=1.2.3) ; extra == 'all'" ], "requires_python": ">=3.6.0", "summary": "Python messenger bot aggregator, supporting Discord, Telegram, and potentially others", "version": "0.0.6" }, "last_serial": 5870490, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4874df6be8c88356192d69028c0cea29", "sha256": "c27def04a6967e9d158359e0d1c32d0bd050b95825613c8213bb495a8d344aa2" }, "downloads": -1, "filename": "botter-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4874df6be8c88356192d69028c0cea29", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8108, "upload_time": "2019-08-11T20:38:14", "url": "https://files.pythonhosted.org/packages/4a/7a/035382ebca83dd3b555f78b1840c24e627e43d618070f1f07ae070b733b0/botter-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f47133c8abf6758fd678d8163b606916", "sha256": "863f5f788f8cafc8467850b5c000c4d20b5820d387413f54b4e45d53050e3605" }, "downloads": -1, "filename": "botter-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f47133c8abf6758fd678d8163b606916", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8444, "upload_time": "2019-08-15T01:09:40", "url": "https://files.pythonhosted.org/packages/83/f2/f82ea6f9c874f3456e3f6c135dc237b3ced88e698d4c9297be0abbdf223f/botter-0.0.2.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "bea07bbcbb6167ad5b71ad96b45576c2", "sha256": "81e4af78f55a9fa2c5b9399262049dd0e7973440f0106a790ac4459f5e4b283f" }, "downloads": -1, "filename": "botter-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "bea07bbcbb6167ad5b71ad96b45576c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 17467, "upload_time": "2019-09-20T23:30:48", "url": "https://files.pythonhosted.org/packages/22/af/17d054270abb026e19f808e5ad465962d9c36fbb5a4f8736faba906ace72/botter-0.0.4-py3-none-any.whl" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "3f53cea5a47c568a4aa3513674ca12ef", "sha256": "5d9ff826075253ac9e9bfbb8ac9937bf426ddbbf079d8b3eec6a445b557f8430" }, "downloads": -1, "filename": "botter-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "3f53cea5a47c568a4aa3513674ca12ef", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 17652, "upload_time": "2019-09-22T12:48:58", "url": "https://files.pythonhosted.org/packages/99/cd/37bc7e883c85c2bbc60916fc54fd34652eaa2eee4555d5efa29fb250a044/botter-0.0.5-py3-none-any.whl" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "c8788317bc1b5b3415a2398a8ff39dd9", "sha256": "6410063e12fde92cd1ab53ffd3512821c91a46052894bb5a4f97d8ef105bd9d2" }, "downloads": -1, "filename": "botter-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "c8788317bc1b5b3415a2398a8ff39dd9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 17618, "upload_time": "2019-09-22T21:30:00", "url": "https://files.pythonhosted.org/packages/d4/fd/b846007dcc8bb4379cd4a0a568ce6e52edeabe7ad6fe1664dab7d09ec7b7/botter-0.0.6-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8788317bc1b5b3415a2398a8ff39dd9", "sha256": "6410063e12fde92cd1ab53ffd3512821c91a46052894bb5a4f97d8ef105bd9d2" }, "downloads": -1, "filename": "botter-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "c8788317bc1b5b3415a2398a8ff39dd9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 17618, "upload_time": "2019-09-22T21:30:00", "url": "https://files.pythonhosted.org/packages/d4/fd/b846007dcc8bb4379cd4a0a568ce6e52edeabe7ad6fe1664dab7d09ec7b7/botter-0.0.6-py3-none-any.whl" } ] }