{"action":"created","issue":{"url":"https://api.github.com/repos/aichaos/rivescript-python/issues/47","repository_url":"https://api.github.com/repos/aichaos/rivescript-python","labels_url":"https://api.github.com/repos/aichaos/rivescript-python/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/aichaos/rivescript-python/issues/47/comments","events_url":"https://api.github.com/repos/aichaos/rivescript-python/issues/47/events","html_url":"https://github.com/aichaos/rivescript-python/issues/47","id":174220772,"number":47,"title":"Adding and getting dynamic triggers","user":{"login":"lynxionxs","id":7606938,"avatar_url":"https://avatars.githubusercontent.com/u/7606938?v=3","gravatar_id":"","url":"https://api.github.com/users/lynxionxs","html_url":"https://github.com/lynxionxs","followers_url":"https://api.github.com/users/lynxionxs/followers","following_url":"https://api.github.com/users/lynxionxs/following{/other_user}","gists_url":"https://api.github.com/users/lynxionxs/gists{/gist_id}","starred_url":"https://api.github.com/users/lynxionxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynxionxs/subscriptions","organizations_url":"https://api.github.com/users/lynxionxs/orgs","repos_url":"https://api.github.com/users/lynxionxs/repos","events_url":"https://api.github.com/users/lynxionxs/events{/privacy}","received_events_url":"https://api.github.com/users/lynxionxs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aichaos/rivescript-python/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-31T09:02:39Z","updated_at":"2016-08-31T20:23:56Z","closed_at":null,"body":"Is it possible to ```get```and ```add``` triggers dynamically ? \r\nFor example from a redis store.\r\nTo be able to add triggers without restarting the bot.\r\n\r\n```python\r\nroutes = {\r\n    \"topic=domath\": {\r\n        \"math\": {\r\n            \"triggers\": getTriggersFromRedis,\r\n            \"args\": \"<star1> <star2>\",\r\n            \"handler\": doMath\r\n        },\r\n        \"wildcard\": {\r\n            \"triggers\": [\"*\"],\r\n            \"args\": \"<star>\",\r\n            \"handler\": wildcardHandler\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nThis way i can also let the bot add new triggers by itself, based on the ```wildcard message``` for a topic.\r\nIt will search for certain keywords like ```action verbs, question verbs etc... ``` in the wildcard message, then determine where to create the new trigger."},"comment":{"url":"https://api.github.com/repos/aichaos/rivescript-python/issues/comments/243889253","html_url":"https://github.com/aichaos/rivescript-python/issues/47#issuecomment-243889253","issue_url":"https://api.github.com/repos/aichaos/rivescript-python/issues/47","id":243889253,"user":{"login":"lynxionxs","id":7606938,"avatar_url":"https://avatars.githubusercontent.com/u/7606938?v=3","gravatar_id":"","url":"https://api.github.com/users/lynxionxs","html_url":"https://github.com/lynxionxs","followers_url":"https://api.github.com/users/lynxionxs/followers","following_url":"https://api.github.com/users/lynxionxs/following{/other_user}","gists_url":"https://api.github.com/users/lynxionxs/gists{/gist_id}","starred_url":"https://api.github.com/users/lynxionxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynxionxs/subscriptions","organizations_url":"https://api.github.com/users/lynxionxs/orgs","repos_url":"https://api.github.com/users/lynxionxs/repos","events_url":"https://api.github.com/users/lynxionxs/events{/privacy}","received_events_url":"https://api.github.com/users/lynxionxs/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T20:23:55Z","updated_at":"2016-08-31T20:23:55Z","body":"Oh, i did'nt know ```stream()``` could be used to \"livestream\" triggers without restarting the bot. \r\nNot sure if ```sortReplies()``` would require a restart though. That will not be ideal in this situation.\r\nI want the bot and rivescript code to be as dynamic as possible.\r\nMeaning less hardcoded triggers.responses in the files.\r\nThanks though."}}
{"actor":{"display_login":"lynxionxs"}}