Streamplace rpg.actor game chatbot (Hopper)
Be your own Streamplace chatbot to reply the game data from someone, using rpg.actor data
place.stream.chat.message- Lexicon

place.stream.chat.message- Operations
- Record created
Steps (6)
game- Value
hopper- Note
- The game name/code (must match the lexicon object)
- If
event.commit.record.streamerequals{{self}}- Chat message was sent in my channel - and
event.commit.record.textequals!{{game}}- Command trigger
Then
GameData- Fetches the game data- Lookup
at://{{event.did}}/actor.rpg.stats/{{game}}
- If
GameData.foundequalstrue- The game data exists
Then
Create a recordAction 1#1ReplyMessage
- Target Collection

place.stream.chat.message- Record Template
{ "createdAt": "{{now}}", "reply": { "parent": { "cid": "{{event.commit.cid}}", "uri": "{{event.uri}}" }, "root": { "cid": "{{event.commit.cid}}", "uri": "{{event.uri}}" } }, "streamer": "{{self}}", "text": "Your {{game}} highscore - Fast: {{GameData.record.data.fast.best}} | Faster: {{GameData.record.data.faster.best}}" }
Otherwise
Create a recordAction 2#2NoDataMessage
- Target Collection

place.stream.chat.message- Record Template
{ "createdAt": "{{now}}", "reply": { "parent": { "cid": "{{event.commit.cid}}", "uri": "{{event.uri}}" }, "root": { "cid": "{{event.commit.cid}}", "uri": "{{event.uri}}" } }, "streamer": "{{self}}", "text": "Looks like you never played {{game}}, no data found." }