Sha256: d7374da32e215927d087887452aeb4aa7b916d9894b9c0d8c5c60e5c4e5a1029

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

module Profile
  # Configure profile for your bot (Start Button, Greeting, Menu)

  START_BUTTON = {
    get_started: {
      payload: 'START'
    }
  }

  START_GREETING = {
    greeting: [
      {
        locale: 'default',
        text: "Hello and welcome, {{user_first_name}}! Say 'hi!'"
      }
    ]
  }

  SIMPLE_MENU = {
    persistent_menu: [
      {
        locale: 'default',
        # If this option is set to true,
        # user will only be able to interact with bot
        # through the persistent menu
        # (composing a message will be disabled)
        composer_input_disabled: false,
        call_to_actions: [
          {
            type: 'nested',
            title: 'Nested Item',
            call_to_actions: [
              {
                title: 'Sub Item 1',
                type: 'postback',
                payload: 'SUB_ITEM_1' # this postback has to be implemented in your main.rb
              },
              {
                title: 'Sub Item 2',
                type: 'postback',
                payload: 'SUB_ITEM_2'
              }
            ]
          },
          {
            type: 'postback',
            title: 'Root Item',
            payload: 'ROOT_ITEM'
          }
        ]
      }
    ]
  }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubotnik-0.2.3 templates/profile.rb
rubotnik-0.2.2 templates/profile.rb
rubotnik-0.2.1 templates/profile.rb
rubotnik-0.2.0 templates/profile.rb
rubotnik-0.1.1 templates/profile.rb