I’m a moderator in one of the Lemmy communities and want to set up a bot to post a message every day. I only found this; is that the best way? I’m a developer, so I’m confident I can set it up on a locally hosted server, but then other moderators won’t be able to edit it. Is there a better way to do this?

    • @sylverstreamOP
      link
      11 year ago

      Thank you. How would you recommend to handle things like daily posts and giving all mods the ability to edit? Especially mods without programming experience?

      • retiolus
        link
        fedilink
        11 year ago

        Please explain in detail how you would like the bot to work and what features it should have.

        One post a day. The same post every day? A default motd that you can edit but as long as you don’t change it, it publishes every day? Should the time be configurable? Etc…?

        • @[email protected]
          link
          fedilink
          2
          edit-2
          1 year ago

          Not OP, but I can give an real-world non-trivial example. The !formula1@lemmy.ml community wishes to set up a series of discussion threads for reach race.

          • The races are irregularly scheduled, but known well in advance. So the ability to schedule a post at an arbitrary time in the future would be desired.
          • There are several session types, practice1, practice2, qualifying, race, and post-race. So the ability to enque multiple posts with different content is desired.
          • Each week, the posts have slightly different content, but it might be templatable across weeks. A templating system for each text attribute on a post may or may not be useful. If this is in place, the scheduling system probably wants to accept either a list of dates or some kind of periodic cron-ish thing (or perhaps a list of schedulables which could each either be a date or a cron-ish thing). Note that in the F1 case, cron isn’t very helpful since the sporting calendar is arbitrary and irregular. If we scheduled more than once race in advance using templating, it would probably be using a list of times. It probably becomes necessary to update or overwrite this schedule as well if a race is cancelled or rescheduled.
          • Possibly it would also be useful to be able to enque pinning and unpinning events of existing posts with the same scheduling primitives to give the posts visibility.

          Hopefully this gives insight into a real world use-case.

  • @[email protected]
    link
    fedilink
    English
    2
    edit-2
    1 year ago

    I haven’t used it, but lemmybot or or the lower-level https://github.com/LemmyNet/lemmy-js-client, which is a pure client with no bot features are what I’m aware of.

    I’d make sure to evaluate the API changes planned for v18 of Lemmy though. There’s a major shift away from the websockets API that’s about to land, and it’s quite possible that you’d build a bot to find out it’s broken a week later and needs to be adapted for a totally different API.

  • Salamander
    link
    fedilink
    English
    21 year ago

    Is this for a single community? Maybe you can host a simple password-protected site where the moderators can modify the message.

    @[email protected] is developing a plant id bot for [email protected], perhaps they can explain to you how they are doing that.

    • @[email protected]
      link
      fedilink
      English
      21 year ago

      Yeah, happy to share the code. It’s python + docker. You’ll probably be able to just simply it!

    • @sylverstreamOP
      link
      English
      11 year ago

      Yeah it’s for a single community, stopdrinking. It’s for the daily check in post.

  • TmpodM
    link
    fedilink
    English
    1
    edit-2
    1 year ago

    I’m slowly but surely working on a rust wrapper that provides an easy API for bots, but it’s far from ready.

  • @[email protected]
    link
    fedilink
    English
    11 year ago

    You could use gihtub/gitlab to host the code for the bot and allow editing that way?

    You could probably use their CI/CD infrastructure to run the bot itself, too!

    • @sylverstreamOP
      link
      English
      11 year ago

      Yeah was thinking about that as well, sounds like a plan. Thanks for the tip.