{"action":"closed","issue":{"url":"https://api.github.com/repos/maubot/maubot/issues/35","repository_url":"https://api.github.com/repos/maubot/maubot","labels_url":"https://api.github.com/repos/maubot/maubot/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/maubot/maubot/issues/35/comments","events_url":"https://api.github.com/repos/maubot/maubot/issues/35/events","html_url":"https://github.com/maubot/maubot/issues/35","id":389660421,"node_id":"MDU6SXNzdWUzODk2NjA0MjE=","number":35,"title":"Replace command system","user":{"login":"tulir","id":4224639,"node_id":"MDQ6VXNlcjQyMjQ2Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/4224639?v=4","gravatar_id":"","url":"https://api.github.com/users/tulir","html_url":"https://github.com/tulir","followers_url":"https://api.github.com/users/tulir/followers","following_url":"https://api.github.com/users/tulir/following{/other_user}","gists_url":"https://api.github.com/users/tulir/gists{/gist_id}","starred_url":"https://api.github.com/users/tulir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tulir/subscriptions","organizations_url":"https://api.github.com/users/tulir/orgs","repos_url":"https://api.github.com/users/tulir/repos","events_url":"https://api.github.com/users/tulir/events{/privacy}","received_events_url":"https://api.github.com/users/tulir/received_events","type":"User","site_admin":false},"labels":[{"id":960252265,"node_id":"MDU6TGFiZWw5NjAyNTIyNjU=","url":"https://api.github.com/repos/maubot/maubot/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/maubot/maubot/milestones/1","html_url":"https://github.com/maubot/maubot/milestone/1","labels_url":"https://api.github.com/repos/maubot/maubot/milestones/1/labels","id":3429371,"node_id":"MDk6TWlsZXN0b25lMzQyOTM3MQ==","number":1,"title":"0.1.0","description":"","creator":{"login":"tulir","id":4224639,"node_id":"MDQ6VXNlcjQyMjQ2Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/4224639?v=4","gravatar_id":"","url":"https://api.github.com/users/tulir","html_url":"https://github.com/tulir","followers_url":"https://api.github.com/users/tulir/followers","following_url":"https://api.github.com/users/tulir/following{/other_user}","gists_url":"https://api.github.com/users/tulir/gists{/gist_id}","starred_url":"https://api.github.com/users/tulir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tulir/subscriptions","organizations_url":"https://api.github.com/users/tulir/orgs","repos_url":"https://api.github.com/users/tulir/repos","events_url":"https://api.github.com/users/tulir/events{/privacy}","received_events_url":"https://api.github.com/users/tulir/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":8,"state":"open","created_at":"2018-06-16T17:34:04Z","updated_at":"2018-12-26T18:56:32Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-12-11T09:09:38Z","updated_at":"2018-12-26T18:56:32Z","closed_at":"2018-12-26T18:56:32Z","author_association":"MEMBER","body":"Something simpler based on event filters (regex body matching, msgtype filters, etc).\r\n\r\nAlso use decorators and make the default plugin start/stop add/remove all the decorated event handlers.\r\n\r\n```python3\r\nfrom maubot import event_handler, Plugin\r\nfrom mautrix.types import EventType, MessageType\r\n\r\n...\r\n\r\nclass MyPlugin(Plugin):\r\n    ...\r\n\r\n    @event_handler(type=EventType.ROOM_MESSAGE, msgtype=MessageType.TEXT, match_body=\"hello, .+!\")\r\n    async def handler(event: MessageEvent) -> None:\r\n        pass\r\n```\r\nFinally add some interactive conversation system.\r\n\r\n```python3\r\n@event_handler(match_body=\"!conversation\")\r\nasync def conversation(event: MessageEvent) -> None:\r\n    # Handle initial command, ask something and start interactive conversation:\r\n    async with event.conversation() as conv:\r\n        event = await conv.read()\r\n        # Handle response\r\n        event = await conv.read()\r\n        # Handle response\r\n```"}}
{"actor":{"display_login":"tulir"}}