Skip to content

operations.yml example

Jason Shin edited this page Apr 17, 2018 · 2 revisions

Operations.yml is a resource file that you can define

  • Event source

    • Discordjs websocket client
    • Webhook
    • Cron
  • Conditions

    • If content equals...
    • If the content contains...
    • According to the spec, we will have to update responsible ActionDispatcher to support this behaviour
  • Operation

    • Actual stateless function
      • For example
      • "get_help_text"
      • "Summarize_todays_articles"
      • "do_something"

Operations.yml example

version: 1
operations:
  - name: summarize_todays_articles_on_trigger
    type: websocket_trigger
    conditions:
      - contentEquals: "!help"
    inputs:
      - client
        message

  - name: summarize_todays_articles_on_cron
    type: cron
    conditions:
       - every: daily
    inputs:
       - discordToken
   
Clone this wiki locally