Can you follow yourself?


  • Plugin & Theme Dev

    okay, so here's the deal.

    I'm creating a bot that runs as a user to do it's thang.

    one of the thangs i want it to do is run as me and add custom "emoji" to my posts by looking for things lik :do_not_want.avi: and replacing that with an image link to an appropriate reaction GIF.

    so what i want to know is, is there a supported way for the bot to be running as @accalia, and be informed of matters every time @accalia of another session makes a post so it can go and do the edit if needed?


  • Admin

    Hm... I'd probably just periodically ping https://community.nodebb.org/api/user/accalia/posts and parse posts that are new.

    Otherwise I'd build a NodeBB plugin, but I have a feeling your bot is... outside of the site and its plugins 😄



  • That's an interesting undertaking. I look forward to hearing more as this project develops.


  • Plugin & Theme Dev

    @julian said:

    I'd probably just periodically ping https://community.nodebb.org/api/user/accalia/posts and parse posts that are new.

    that's about what i thought as well, I was hoping to avoid having to do that as i wanted to avoid putting undue strain on the server by doing a tight poll, but at the same time wanting to make the edits seamless... I will have to think on this some more i guess

    thanks!

    @julian said:

    I have a feeling your bot is... outside of the site and its plugins

    it is indeed. expect a launch announcement soon once i finish cleaning it up and getting test coverage (oh and writing some documentation too.)

    if you want a preview it is on github


  • Admin

    @accalia One thing I haven't tried is subscribing to the socket.io server from your bot. From there, you'll receive the events (provided you're in the right room), including posts...


  • Plugin & Theme Dev

    @julian said:

    (provided you're in the right room)

    that's actually what got me to thinking i could do this.

    See my bot doesn't actually ever enter a room and in my testing seems to get new post events sent to it for all posts except my own.

    so if i could figure out a way to get my own as well that would be a simple matter of looking for new posts by my user id and processing them for the "gifmoji" tags.

    i suppose i could do it as a "gifmoji mod" so i run the module on a different login, but that means that i'd need the cooperation of the forum staff and i'd probably also have to be a mod (because i'd know the bot's credentials and it would be a mod) and that is very much :do_not_want.avi:

    still, i'll figure something out. ;-)




Looks like your connection to NodeBB was lost, please wait while we try to reconnect.