Skip to content

Bot Mode #11

@kesne

Description

@kesne

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.

Modes

  • Hybrid - A flexible mode that lets you configure a bot account or an incoming webhook, plus the outgoing webhook. This doesn't require a full bot with a server on 24/7, and is the most friendly option for deploying cheaply to heroku.
  • Response - A simplified version of the bot which will only respond to prompts. This allows you to configure it just as an outgoing webhook.
  • Bot - Instead of having an outgoing webhook, you can just configure a bot which will sit in the rooms and.

Using

You can configure the modes via environment variables. By default, the mode is set to response, but you can override that by setting the JBOT_MODE variable.

  • JBOT_MODE - (hybrid | response | bot) Sets the bot mode manually.
  • JBOT_API - The API token to use for the bot. If this is set,
  • JBOT_VERIFY_TOKEN - The token for the outgoing webhook to verify the request origin.
  • JBOT_ROOMS - The rooms for the bot to field messages from. Only used if mode is set to bot. This defaults to ['jeopardy'].

What Needs To Happen

  • Update how responses are sent to facilitate sending them in some order.
  • Implement hybrid mode on top of response mode.
  • Generalize logic in response handler into function that can be called from bot account.
  • Implement bot mode.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions