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)

Conditiongate
  • Continue only if event.commit.record.streamer equals {{self}} - Chat message was sent in my channel
Conditiongate
  • Continue only 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
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": {
    "$type": "place.stream.chat.message#replyRef",
    "parent": {
      "$type": "com.atproto.repo.strongRef",
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    },
    "root": {
      "$type": "com.atproto.repo.strongRef",
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    }
  },
  "streamer": "{{self}}",
  "text": "{{MyCurrentStream.record.activity.name}}{{MyCurrentStream.record.activity.label}}"
}