Streamplace chatbot category

Be your own Streamplace chatbot replying to !game with your current stream category (current game or other activities)

place.stream.chat.message
Lexicon
place.stream.chat.message
Operations
Record created

Steps (5)

Conditionbranch
  • If event.commit.record.streamer equals {{self}} - Chat message was sent in my channel
Then
Conditionbranch
  • If event.commit.record.text equals !game - Command
  • or event.commit.record.text equals !jogo - Command
  • or event.commit.record.text equals !category - Command
  • or event.commit.record.text equals !categoria - Command
Then
Search recordsMyCurrentStream- Search for my stream data
Collection
place.stream.livestream
In repo
{{self}}
Where
url equals https://stream.place/{{self}}
Conditionbranch
  • If MyCurrentStream.found equals true - Checks if the stream data was found
Then

Create a recordAction 1

Target Collection
place.stream.chat.message
Record Template
{
  "createdAt": "{{now}}",
  "reply": {
    "parent": {
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    },
    "root": {
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    }
  },
  "streamer": "{{self}}",
  "text": "{{MyCurrentStream.record.activity.name}}{{MyCurrentStream.record.activity.label}}"
}