Streamplace song chatbot (Rocksky)

Be your own Streamplace chatbot to say which song you are listening to (works with Rocksky)

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

Steps (4)

Conditionbranch
  • If event.commit.record.streamer equals {{self}} - Chat message was sent in my channel
  • and event.commit.record.text equals !song - Song command
Then
Fetch recordSongActor- Fetches current song from Rocksky
Lookup
at://{{self}}/app.rocksky.actor.status/self
Conditionbranch
  • If SongActor.found equals true
Then

Create a recordAction 1

Target Collection
place.stream.chat.message
Record Template
{
  "$type": "place.stream.chat.message",
  "createdAt": "{{now}}",
  "reply": {
    "parent": {
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    },
    "root": {
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    }
  },
  "streamer": "{{self}}",
  "text": "Now playing: '{{SongActor.record.track.name}}' - {{SongActor.record.track.artist}} ({{SongActor.record.track.album}})"
}