{"action":"opened","issue":{"url":"https://api.github.com/repos/kesne/jeopardy-bot/issues/11","labels_url":"https://api.github.com/repos/kesne/jeopardy-bot/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/kesne/jeopardy-bot/issues/11/comments","events_url":"https://api.github.com/repos/kesne/jeopardy-bot/issues/11/events","html_url":"https://github.com/kesne/jeopardy-bot/issues/11","id":109699005,"number":11,"title":"Add optional mode","user":{"login":"kesne","id":498479,"avatar_url":"https://avatars.githubusercontent.com/u/498479?v=3","gravatar_id":"","url":"https://api.github.com/users/kesne","html_url":"https://github.com/kesne","followers_url":"https://api.github.com/users/kesne/followers","following_url":"https://api.github.com/users/kesne/following{/other_user}","gists_url":"https://api.github.com/users/kesne/gists{/gist_id}","starred_url":"https://api.github.com/users/kesne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kesne/subscriptions","organizations_url":"https://api.github.com/users/kesne/orgs","repos_url":"https://api.github.com/users/kesne/repos","events_url":"https://api.github.com/users/kesne/events{/privacy}","received_events_url":"https://api.github.com/users/kesne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-04T19:21:14Z","updated_at":"2015-10-04T19:21:14Z","closed_at":null,"body":"Right now we have one mode, which requires two slack integrations. This kind of sucks, so let's see if we can fix it by introducing modes.\r\n\r\n## Modes\r\n\r\n- *Mixed* - \r\n- *Response* - A simplified version of the bot which will only respond to prompts. This allows you to configure it just as an outgoing webhook.\r\n- *Bot* - Instead of having an outgoing webhook, you can just configure a bot which will sit in the rooms and.\r\n\r\n## Using\r\n\r\nYou can configure the modes via environment variables. By default, we try to determine the mode based on which values are set, but you can override that by setting the `JBOT_MODE` variable.\r\n\r\n- `JBOT_MODE` - _(mixed|response|bot)_ Sets the bot mode manually.\r\n- `JBOT_API` - The API token to use for the bot. If this is set, \r\n- `JBOT_VERIFY_TOKEN` - The token for the outgoing webhook to verify the request origin.\r\n- `JBOT_ROOMS` - The rooms for the bot to field messages from. Only used if mode is set to `bot`. This defaults to `['jeopardy']`.\r\n\r\n### Auto Determining Mode\r\nIf `JBOT_MODE` is set to a valid value, use that.\r\nIf `JBOT_API` is set and `JBOT_ROOMS` is set, use mode `bot`.\r\nIf `JBOT_API` is set and `JBOT_VERIFY_TOKEN` is set, used mode `mixed`.\r\nIf `JBOT_API` is set, use mode `bot`.\r\n\r\nOtherwise, fall back to `response`."}}