Streamplace chatbot title

Be your own Streamplace chatbot replying to !title with your current stream title

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 !title - Command
  • or event.commit.record.text equals !titulo - 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.title}}"
}