Streamplace radio chatbot (atradio.fm)

Be your own Streamplace chatbot to say which radio you are listening to (works with atradio.fm)

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 !radio - Radio command
Then
Fetch recordRadioActor- Fetches current radio from atradio.fm
Lookup
at://{{self}}/fm.atradio.actor.status/self
Conditionbranch
  • If RadioActor.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": "Radio playing: '{{RadioActor.record.station.name}}' - from {{RadioActor.record.station.country}}"
}