Dear #botsinspace bot creators,
-
These polls follow on from this semi-educated guess: https://hachyderm.io/@thisismissem/113393816400315852 #botsinspace
-
If your bots receive data, what are you doing with it?
-
@thisismissem do you wish replies from bot operators which run somewhere else than botsinspace?
-
@guerda sure, I guess!
-
@thisismissem
I have 3 (main?) bots.
@covid_ygk scrapes a handful of data feeds to generate posts
@multiverse is generative, and will reply to mentions with a new generated reply
@CheerLights is interactive; when you send a colour to it (like red), it forwards the colour to the CheerLights network and real, physical lights change colour all over the world (https://cheerlights.com) -
@thisismissem
Multiverse runs on a cron job and polls for mentions. It can take a few minutes to reply.
CheerLights uses the websocket api, so it gets mentions right away and can ideally respond very quickly, in near-realtime if the instance isn't lagging. -
@silvermoon82 so both could build off a webhook for replies or mentions?
-
@thisismissem
Yup, certainly! CheerLights might be tidier that way, right now it has to maintain two websockets, one for mentions and one for the hashtag.
Are you scheming? Do you have ideas written down publicly yet? -
@silvermoon82 you can actually connect just to /api/v1/streaming and then send two messages:
{ “type": “subscribe”, "stream”: “hashtag”, "tag": “foobar” }
{ “type": “subscribe”, "stream”: “user:notification” }Using websocket.send(JSON.stringify(…))
And that'll subscribe you to both channels.
-
@thisismissem
Oh, sweet! I wonder if that's new since I last read the docs. Thanks so much! -
@silvermoon82 it's been there a long time, but it's not really well documented.
You'll not know which "stream" the message is coming in from though.
-
Some interesting results from these polls: