Skip to main content

Streamplace link chatbot (linkat)

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 (5)

Variableurl
Value
https://linkat.blue/vicwalker.dev.br
Note
[EDITAR] URL, precisa incluir https://
VariabletamanhoUrl
Value
36
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
Then
Conditionbranch
  • If event.commit.record.text equals !linkat - Comando
  • or event.commit.record.text equals !atproto - Comando
  • or event.commit.record.text equals !atmosphere - Comando
  • or event.commit.record.text equals !atmosfera - Comando
  • or event.commit.record.text equals !at - Comando curto
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": 36,
        "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.