Skip to main content

Streamplace link chatbot (links)

Seja seu próprio chatbot no Streamplace respondendo comandos

place.stream.chat.message
Lexicon
place.stream.chat.message
Operations
Record created
Watched repos
All repos

Steps (4)

Variableurl
Value
https://links.vicwalker.dev.br/
Note
[EDITAR] URL, precisa incluir https://
VariabletamanhoUrl
Value
31
Note
[EDITAR] Conte exatamente quantos caracteres a sua URL tem, o valor precisa ser editado aqui e no campo "byteEnd" mais abaixo
Conditionbranch
  • If event.commit.record.streamer equals {{self}} - Mensagem foi enviada no próprio canal
  • and event.commit.record.text equals !links - Comando
Then

Create a recordAction 1

Target Collection
place.stream.chat.message
Record Template
{
  "$type": "place.stream.chat.message",
  "createdAt": "{{now}}",
  "facets": [
    {
      "features": [
        {
          "$type": "app.bsky.richtext.facet#link",
          "uri": "{{url}}"
        }
      ],
      "index": {
        "byteEnd": 31,
        "byteStart": 0
      }
    }
  ],
  "reply": {
    "parent": {
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    },
    "root": {
      "cid": "{{event.commit.cid}}",
      "uri": "{{event.uri}}"
    }
  },
  "streamer": "{{self}}",
  "text": "{{url}}"
}
$type is set to the target collection when the record is written.