Lemmy Bots and Tools

455 readers
1 users here now

Welcome to the programming.dev lemmy development community! This is a place to discuss and show off bots, tools, front ends, etc. you're making that relate to lemmy

Theres another version of this community over at lemm.ee if you want to subscribe to that one as well

Icon base by DarkZaitzev under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
1
4
submitted 1 year ago* (last edited 1 year ago) by Ategon@programming.dev to c/lemmy_dev@programming.dev
 
 

With lemmy.world having published their own set of bot guidelines I figured I should make some here as well to get some parity

The rules are less strict than lemmy.worlds rules within the confines of programming.dev but for communities in instances outside programming.dev default to the lemmy.world rules unless told otherwise

Bot Guidelines:

  1. Mark Bots as Bots Bot accounts should be marked that they are a bot using the checkbox in the user settings. This includes any automation in an account (if you automate part of your personal account, put what the automation is in your bio so people know)
  2. Put contact info The owner of the bot and some way to contact them must be in the bot's bio (unless its an automated personal account, in that case the account itself it the way to contact)
  3. Use mentions as prefix If a bot has commands it should use its mention as a prefix. (This will allow different bots to use the same commands without interfering with each other)
  4. Dont spam Bots should not spam posts or comments. (If a bot command has been used its fine to do a response but dont drown out non bot posts in the local new sort.) Certain cases are unavoidable such as if you want to get a bot posting weekly threads in different communities at the same time but in those cases please contact me first to get it approved
  5. Allow mods to opt in Bots participating in a community should be opt in so communities can choose what bots they want. If you want a bot to be allowed in a community please contact the moderators of that community first. EXCEPTION: If a bot is deemed to be a well behaving bot that brings net good to the instance it can override this rule as long as it has been approved by an admin. This can include things such as a tldr bot, remindme bot, link fixer bot, piped link converter bot, etc. If a bot has overriden rule 5 with this exception community moderators should still be able to opt out of the bot

These rules should bring us up to parity with lemmy.world along with allowing a bit more leeway within the instance since there has been some nice bots getting made that I dont want unfairly punished

If you have a bot you want whitelisted for the entire instance for the rule 5 exception feel free to dm me here or on matrix

And if anyone has any suggestions for changes to these rules feel free to comment them. They can be adjusted as needed if any issues with them come up

2
 
 

Hi there!

Since the last time the LemmyWebhook package gained quite a few new capabilities so I've decided it's time for another post.


Quick intro to the package: It adds support for webhooks to Lemmy, meaning you can get notified of events to automatically react to, instead of having to poll for everything, often using multiple http requests. Everything is done in a quite efficient way which avoids hitting your database as much as possible and if it does, it only uses queries on primary key. You can also (optionally) make it available to other users who can then run their bots on your instance only on the permissions you allow them, meaning if you only grant them access to post events, they don't also get access to new user events.


So, what's new?

  • When you listen for an update event, you get the previous version of data in addition to the current one, meaning you can directly compare what has changed
  • New function for getting parent comment id have been added, with this you can for example detect if someone is replying to your bot
  • You can now listen for community subscribe/unsubscribe event

As usual, let me know what you think, feel free to offer suggestions or ask questions.

3
 
 

Iโ€™ve updated @Mistral@lemmings.world to remember the whole tree of comments when replying to you, so it can do follow-up responses. You still have to mention it on every message, though. Example in the comments.

4
 
 

How does one make a Lemmy bot? A couple of communities I moderate could benefit from a bot to post regular threads based on a template or respond to comments which contain key phrases.

How and where are Lemmy bots hosted? What language are they written in? I have some basic coding experience with Python/Bash/C++, but am not sure where to start when it comes to something like this.

Are there any good step-by-step guides for building a Lemmy bot?

5
 
 

Crossposting what I found in another community, original text below:

If youโ€™d like to test it download it here

GitHub repo releases

Try it out & feel free to report any bugs.

Testing aims to eliminate bugs and enhance user experience before app hits the market.

Should you have any questions post it below, on Github or send an email: diego.beraldin+raccoon4lemmy@gmail.com

App includes mod tools. Happy testing!

In case you are interested and willing to participate, drop the dev a direct message or email above. Since Google allows only to access closed tests, they need to add the email address you use in Google Play to the tester group.

6
 
 

Quite some time ago I've posted about the tool, back then it only supported linking to communities, now it supports users and posts as well.

So what is this?

This is a service that's great for linking to Lemmy posts/users/communities in an instance-agnostic way.

What's the problem?

When you link to a community (user, post) using its URL, the users are taken to your instance instead of their own.

With this tool, you can wrap them in a lemmyverse.link link that offers them to set their home instance (or ignore it and go straight to the user/community/post).

Some examples

Note that some of those problems have a solution when you're linking to content in Lemmy, for example the community can be linked like this: !lemmings_world_instance@lemmings.world and almost all clients support it. The 2nd link can be handled like this: @rikudou@lemmings.world - this format is notably not supported by the default Lemmy UI. To my knowledge, the 3rd link currently doesn't have any widespread equivalent solution (though some apps may support handling such cases). But without a tool like this one, you can't comfortably link to Lemmy content from outside of Lemmy (like in an article, blog post etc.)

On the homepage you will find a generator where you can simply paste the URL and it will generate a link for you.

You can also set 3rd party frontends as your target instance, for example a.lemmings.world for Alexandrite hosted on Lemmings.world or photon.lemmy.world hosted on Lemmy.world.

You can also access the tool at https://threadiverse.link

7
 
 

My Lemmy Schedule app now includes the option to get notified of new posts in a specific community!

In case you haven't heard about the app before, here's what other things it can do:

  • schedule a post and post it to multiple communities
    • you can upload an image as well and choose between uploading to your Lemmy instance or to Imgur
  • create a recurring post that gets posted at a specific date and time (especially useful for daily/weekly/monthly/end-of-month threads)
  • schedule pinning and unpinning of posts (instance and community)
    • the pinning and unpinning can be specified as part of creating a post
  • the aforementioned notifications about unread posts from a specific community (useful for mods)
    • can be also set using a recurring schedule, so you can get the report daily/weekly/monthly etc.

To learn more, visit the !schedule@lemmings.world community.

P.S. It's open source and can be self-hosted using docker!

8
 
 

Hey everyone! I recently finished up the remindme bot 1.4 update to make it comply with the lemmy.world bot guidelines

The bot now functions using an allowlist so if you want it to work in your community make sure to open up a federation request issue on the repository

This bot aims to give people an easy way to remind themselves about an event on the fediverse. For example if theres something releasing in a couple months people can set a reminder using @RemindMe@programming.dev 2 months and they will get a reply to that message 2 months from then reminding them about it so they can check it out. (reminders are handled by replies so that it functions in kbin communities, and so that users from platforms such as mastodon can also use it in the communities)

Bot is fully open source so feel free to make pull requests with new features if you want or customize it to adapt it for your community if you want to self host.

Hope you enjoy it :) More bots on the way as I go through and update them all

(p.s. the bot works in all programming.dev communities so you can test it out here)

Repository: https://github.com/PangoraWeb/remindme-bot
Matrix Space for Pangora: https://matrix.to/#/#pangora:matrix.org

9
 
 

cross-posted from: https://lemmy.toldi.eu/post/69308

Hello everyone!

I've just released the first version of Eternity (after changing the name from Infinity for Lemmy). It's been long overdue, but I wanted to finish a few features before this update. This release includes various fixes and new features, such as:

  • Blocking users/communities

  • List blocked users/communities

  • Separate up/down votes (can be disabled in the settings)

  • Private messages

  • Content reporting

  • New themes (including a new default one!)

  • Fixed various crashes.

And a huge thank you to everyone who provided feedback, translated the app, or contributed in any form during the testing phases of this release. Your insights and suggestions were invaluable in making Eternity better for all users. I'll continue to gather feedback and make improvements in the coming updates, so please don't hesitate to reach out with any further thoughts or issues you might encounter. Your support and engagement mean the world to me! Happy browsing!

10
 
 

cross-posted from: https://sh.itjust.works/post/3365629

The app that synchronizes multiple lemmy accounts so you can migrate and keep backup accounts across instances, it's opensource and free, currently working in android and windows.

It's in homologation now and anyone can test, any feedbacks are welcome as always.

If you find any bugs please report

Github Source


Download now


11
 
 

cross-posted from: https://lemmy.ca/post/3660150

Hi, I've just been responding to feedback and implementing suggestions and release 141 is just that. Large new features are in-app release notes, customization for comment long-press actions, and community filters. Alongside a dozen smaller fixes, additions, and optimizations.

Added

  • Added hex input to colour pickers
  • Added setting to change comment long press action
  • Added option to hide nsfw in main feeds but not inside communities (note currently only applies to 'hide')
  • Added sign up button on sign in page
  • Added sticky sort (remembers changes to sort)
  • Added community filters (filters posts from communities whose name matches a filter)
  • Added setting to control notification time Interval (10S to 12H)
  • Added share and hide to comment swipe actions
  • Added release notes to app startup
  • Added setting to control release notes

Fixed

  • Fixed table markdown in some scenarios
  • Fixed the exit confirmation not showing when the left drawer was disabled
  • Fixed issue with jumping to parent comment being offset in comment navigator
  • Fixed draft comments loading the wrong comment while editing when you have multiple comments
  • Fixed 'View full post' modal not disappearing on click
  • Fixed theme setting not persisting
  • Some optimizations to how posts are laid out, scrolling should feel smoother
  • Small logo tweak

Thank you everyone for all of the support and suggestions, please keep them coming and we'll continue to make Connect the best app for browsing Lemmy!

Links:

-kuroneko

12
 
 

cross-posted from: https://lemmy.toldi.eu/post/66974

Hello everyone!

I'm excited to bring some news to our wonderful community today. After an engaging voting process on the voting thread, we as a community have decided to change the name from Infinity for Lemmy to Eternity. ๐ŸŽ‰ I am grateful to everyone who participated and voiced their opinions. It was great to see so much involvement!

While !eternityapp@lemdro.id will be our new gathering space, I'd like to let you know that the original !infinityforlemmy@lemdro.id won't be closing its doors immediately. This way, everyone has enough time to transition comfortably and get accustomed to our new home.

Lastly, remember, while names may change, our spirit and camaraderie remain eternal. I cherish our roots with "Infinity for Reddit" and am excited about the journey ahead in "Eternity". Let's collaborate, share, and continue building on this vibrant community.

Have fun and see you all in Eternity! ๐Ÿš€๐ŸŒŒ

13
 
 

This is a great way to include comments and discussion on a static site. Take a look at the demo.

14
 
 

I hope this is allowed, if not, I'll delete the post, I just wanted to share some stats of my bot because I'm quite excited about them.


 ---------- --------- ----------- ------------------------- ------------------------- ------------------------ 
  Comments   Upvotes   Downvotes   Negative comments count   Positive comments count   Neutral comments count  
 ---------- --------- ----------- ------------------------- ------------------------- ------------------------ 
  2769       13734     426         0                         2769                      0                       
 ---------- --------- ----------- ------------------------- ------------------------- ------------------------

Note that the bots default upvote is not considered for the stats. Positive comments are those where there's more upvotes than downvotes, neutral ones are those where downvotes and upvotes are the same and negative are when the comment has more downvotes than upvotes.

15
 
 

I've made an open source tool for scheduling posts to Lemmy, you can find it at https://schedule.lemmings.world. It can be used by users from any instance and it can be self-hosted if you wish so!

Changes since the last time I posted about it:

  • you can now login with 2FA enabled
  • you can schedule pin and unpin of posts in a community if you're the mod
  • you can schedule pin and unpin of posts in an instance if you're the admin
  • when creating a post, you can choose to pin it to the community (if you're a mod)
  • you can choose the language of your posts
  • an official support community has been created at !schedule@lemmings.world
  • you can post the same post into multiple communities easily, just select the communities and multiple scheduled posts will be created

Let me know what you think!

16
 
 

Hey folks, I created a OpenApi documentation of the Lemmy API.

https://mv-gh.github.io/lemmy_openapi_spec/

17
13
App to schedule posts on Lemmy (schedule.lemmings.world)
submitted 1 year ago* (last edited 1 year ago) by rikudou@lemmings.world to c/lemmy_dev@programming.dev
 
 

I've made an app that makes it possible to schedule a post in Lemmy at an arbitrary time. It's available at https://schedule.lemmings.world and can be used by people from any instance.

Let me know what you think!

P.S. This post was made using the app!

Edit: And it's open source!

18
 
 

cross-posted from: https://lemmy.world/post/2807814

It's taken a lot of hard work and I'm excited to announce that Voyager is now on the Apple App Store!

If you have time, download the app and consider leaving a review! This helps Voyager gain visibility and legitimacy.

Get the App!

https://apps.apple.com/us/app/voyager-for-lemmy/id6451429762

Can I continue to use the PWA?

Of course! The PWA is self-hostable, hackable, and receives updates quicker. However, it doesn't have access to certain native APIs that the native app takes advantage of.

Can I continue to use the Test Flight beta?

Yes, but I recommend switching to the App Store release if you aren't actively involved in testing. It's a more stable release :)

Get the App: https://apps.apple.com/us/app/voyager-for-lemmy/id6451429762

Enjoy! ๐Ÿ’™

19
 
 

Hi folks, so glad this channel is here.

Recently, I:

  • Created a community called fullmoviesonyoutube on lemm.ee
  • Decided I wanted to write a bot to post helpful comments when people post movies there.
  • Created another community called fullmoviesbottesting.
  • Created a user on lemm.ee called fullmoviesbot
  • Wrote and tested the bot from my PC using the lemmy-bot as a starting point, pointing it at that 'fullmoviesbottesting' community, until I was finally pretty happy with it.
  • Updated the bot's code so the federation - allowlist points to 'fullmoviesonyoutube' on the same lemm.ee instance.
  • Ran the bot, created a post with my personal lemmy account.... and nothing happened.

The bot is not creating comments in the new channel. It's like it doesn't see posts created by any other users.

Is there something I need to do to get my bot to recognize posts from other users in the new channel?

I did a test where I logged into lemm.ee in my browser with the bot's user, and created a post and the bot created a comment on that post, but for some reason, that bot-created post doesn't show up in the community. This is that "orphaned" post: https://lemm.ee/post/2896238

I guess another way to ask this - what are the rules for bot's when it comes to creating comments on other user's posts?

EDIT


Here's the full code: https://controlc.com/dd54eae6

(it's rough - don't judge me) Thanks!

20
17
submitted 1 year ago* (last edited 1 year ago) by rikudou@lemmings.world to c/lemmy_dev@programming.dev
 
 

You can find it here. Source code in the link.

21
 
 

I have tried to decode jwt, but sub field refers to completely different user

22
 
 

I've updated the bot and added the possibility of translating hardcoded links (like this one: https://lemmy.world/post/2355178 or this one: https://lemmy.world/comment/1863672) to posts/comments with links from your instance when you mention him. I'll show an example in comments.

23
 
 

It now supports 0.18.3 and contrary to previous releases it supports unauthenticated requests where it makes sense.

https://github.com/RikudouSage/LemmyApi/

24
 
 

I created a discord bot which gets memes from lemmy RSS feeds and posts them to discord. I'm still learning, please suggest improvements/features!

25
 
 

Lemmy devs, please share if you built any tool that backup a single user's Lemmy account, settings, subscriptions - then can migrate or restore the account as new into other instance. This tool will be used by the user themselves, not by the instance admin.

Can we migrate a user's post and comments to another instance? Maybe like a bulk posting as new posts.

view more: next โ€บ