[WIP] Streamplace shoutout v0.1

Similar to Twitch's shoutout command, use this automation to give another streamer a shoutout inside your Streamplace chat

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
  • and event.did equals {{self}} - Chat message was sent by me
  • and event.commit.record.text starts with !shout - Chat message starts with the shoutout command [DO NOT EDIT]
Then
Search recordsTheirLastStream- Search for their last stream data
Collection
place.stream.livestream
In repo
{{event.commit.record.facets.0.features.0.did}}
Where
url equals https://stream.place/{{event.commit.record.facets.0.features.0.did}}
Conditionbranch
  • If TheirLastStream.found equals true - Checks if the last stream data was found
Then

Create a recordAction 1#1ShoutoutMessageWithData

Target Collection
place.stream.chat.message
Record Template
{
  "createdAt": "{{now}}",
  "facets": [
    {
      "features": [
        {
          "$type": "app.bsky.richtext.facet#mention",
          "did": "{{event.commit.record.facets.0.features.0.did}}"
        }
      ],
      "index": {
        "byteEnd": "{{event.commit.record.facets.0.index.byteEnd}}",
        "byteStart": "{{event.commit.record.facets.0.index.byteStart}}"
      }
    }
  ],
  "streamer": "{{self}}",
  "text": "Follow {{didToHandle(event.commit.record.facets.0.features.0.did)}}! Last Stream: {{TheirLastStream.record.title}} {{TheirLastStream.record.activity.label}}"
}
Otherwise

Create a recordAction 2#2ShoutoutMessageWithoutData

Target Collection
place.stream.chat.message
Record Template
{
  "createdAt": "{{now}}",
  "facets": [
    {
      "features": [
        {
          "$type": "app.bsky.richtext.facet#mention",
          "did": "{{event.commit.record.facets.0.features.0.did}}"
        }
      ],
      "index": {
        "byteEnd": "{{event.commit.record.facets.0.index.byteEnd}}",
        "byteStart": "{{event.commit.record.facets.0.index.byteStart}}"
      }
    }
  ],
  "streamer": "{{self}}",
  "text": "Follow {{didToHandle(event.commit.record.facets.0.features.0.did)}}!"
}