Lemmy Integrations

248 readers
1 users here now

A community about all integrations with the lemmy API. Bots, Scripts, New Apps, etc.

founded 6 months ago
MODERATORS
1
2
 
 

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

Media Bias Fact Check - Automation

Hello World, As many of you have probably noticed, there is a growing problem on the internet when it comes to undisclosed bias in both amateur and professional reporting. While not every outlet can be like the C-SPAN, or Reuters, we also believe that it's impossible to remove the human element from the news, especially when it concerns, well, humans.

To this end, we've created a media bias bot, which we hope will keep everyone informed about WHO, not just the WHAT of posted articles. This bot uses Media Bias/Fact Check to add a simple reply to show bias. We feel this is especially important with the US Election coming up. The bot will also provide links to Ground.News, as well, which we feel is a great source to determine the WHOLE coverage of a given article and/or topic.

As always feedback is welcome, as this is a active project which we really hope will benefit the community.

Thanks!

FHF / LemmyWorld Admin team 馃挅

3
 
 

Allows plugins in any language. Developers need some feedback on which hooks to add.

Planning to cook something up ASAP.

4
 
 

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.

5
 
 

I鈥檝e updated @[email protected] 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.

6
 
 

Just for fun, I've cooked this script to rotate social media avatars using Stable Diffusion via the AI Horde. Currently it only supports Lemmy, but in the future I plan to add support for more software like mastodon etc.

It can rotate user avatar/banner and community/site icon/banner.

Currently I've set it to rotate the lemmy.dbzer0.com site banner every day. I'll deploy it to rotate some communities icons/banners soon as well.

Let me know what you think, and if you want it to support more software, or provide more complex generations, or any other enhancements, feel free to send PRs.

7
 
 

cross-posted from: https://lemmy.ml/post/12426588

There's now a swagger documentation for the Lemmy API.

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

8
 
 

Hey y'all. I've been working on this little project ever since the recent spam wave started. This is a very basic Python automoderator bot which will monitor the comments and posts federated into your instance for specific regex instances and then automatically report, delete, ban etc.

The Bot setup is very simple, as you can just chuck its docker-compose entry into your existing lemmy one. You just need to fill in the relevant environment variables.

The bot works by constantly polling your incoming reports, posts and comments, and matching them against provided regex.

I wanted to keep things simple for admins, so the bot configuration happens via a simple PM syntax. The README goes into details on this. But you basically send a message like this to the Bot to add a new filter

threativore add comment filter: `trial period`
reason: `Spam comment`
action: `REMOVE`
description: `Known spam string`

All bot controls work the same way. Eventually I want to add a UI to it.

The bot is built with collaboration in mind. So you can add more people to help you maintain your filters (even if they're not admins), you can add users whose reports will be treated more seriously, and you can even mark users as "ham" (i.e. known not spammers) to prevent them ever being filtered.

This is just the very first release and I have a lot of ideas to improve it in the future. Here's some stuff in my roadmap which should make the threativore a much more collaborative/crowdsourced process between multiple instance admins and the larger userbase. Stay tuned.

PRs and suggestion are welcome.

PS: The bot is already active on https://lemmy.dbzer0.com, so you can check the modlog for its actions.

9
 
 

I have a 21:9 and I'd like things to be able to use that real estate. Is there a chromium plugin that could achieve this that you know of? I couldn't find one specifically for Lemmy

10
 
 

I'm looking for a way to pull images from my Lemmy feed and display them on desktop tiles, similar to Scrolldit. Ideally, the images would refresh every so often.

Does anything like this exist?

Thank you

11
 
 

It's been a while since I've last posted about this package and quite a lot has changed since then.


So, what does this package do? It adds support for webhooks to Lemmy in an efficient way, meaning you can subscribe to various events like a new post created, new comment added and so on. Very useful, for example, for automods or other bots that need to react fast.

Since the last time I've added more object types, so in addition to posts and comments you can now listen for:

  • comment reports
  • instances being added or updated (for example federation changes)
  • local users (users local to your instance, it's a distinct type from all users, it contains stuff like email and other stuff that doesn't get federated to other instances)
  • all users in general (this includes federated and local users)
  • post reports
  • private messages (does not contain the message text itself, only metadata like recipient and the author)
  • private message reports
  • registration applications

Another huge improvement is an api that allows users to create webhook and even more importantly a simple GUI for management of your webhooks. This means that this package is no longer only for instance admins, but bot authors in general can ask their instance admins for access to webhooks (and to install the webhooks package to their Lemmy instance if they don't have it yet) and if the admins grant it, you now have access to webhooks. Every access is scoped, meaning if your bot only needs access to posts, you don't need to ask for the permission to receive registration applications, meaning admins can freely grant you access to webhooks without also giving you access to stuff you shouldn't have access to.


There's also support for bulk import of webhooks based on a YAML document, meaning creators of bots and other applications that have support for webhooks can create a YAML document with all the webhooks other people then can import without any trouble. Each imported webhook needs a unique ID which allows the system to track changes to it which allows the importer to update old webhooks instead of duplicating them (as long as they share the same ID).


Let me know what you think, your ideas for improvements or any comments in general are welcome!


P.S. If someone wants to try it out, you can use my instance. The webhooks are available at https://webhooks.lemmings.world (accounts must be manually approved, so be patient and ideally write me a PM if you want the access quicker).

12
 
 

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

I made this bot so that users who want to provide a quick summary of the wikipedia article they linked to in their comment can do so just by including a mention of the bot in their comment, and the bot will reply to the comment with the summary.

Currently multiple wikipedia links is not supported.

bot: https://lemmy.world/u/wikibot

13
23
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 
 

As inspired by the bots on Reddit that respond to certain words, I've thrown together this code which allows anyone to set up their own response bot.

There is a bit more detail on Github, but in summary you can set your own trigger word and responses, and you have two modes of operation, "Exclude" which is the default and covers every community you're federated with (and allows moderators of a community to PM the bot to exclude it) and "Include", where you can pick a single community for the bot to be active in.

This is really early days and rough, but should work at the most basic level. Anyone who can provide some ideas/feedback/improvements - I'm totally open to them.

And to prove it works, I'm running Legolas Bot. Any comment you make below with the word "legolas" in will get a response (probably).

Small updates to reduce spaminess - will only reply to top level comments now.

Edit: Little updates include customisable polling rates and the ability to tag the comment creators name in a response.

14
15
 
 

Hi all !

I apologize if i'm off topic. A friend advised to post here. :)

On jlai.lu i use megathread a lot. Its main goal is to regroup all related posts to a topic and leave a link to the megathread in comment.

Here is an example : https://jlai.lu/post/3905951

So let's explain how it would work, feel free to improve this draft or tell me if it's not feasible. I'm not well tuned zith editing rights

First the user has to create a post with sections and send it to the bot. Then the bot @[email protected] publish it to the community mentionned by the user.

Example :

@[email protected] create a post in [email protected] :

Farm
# Vegetable
# Market
# Climate

[[email protected]](/c/[email protected])

I'm an user. I explore lemmy.tdl and see a post Meat market is decreasing in Europe related to the megathread Farm for the section Market and i want to add it to the megathread Farm

So i can call this bot like this : [email protected] add to Farm section Market (maybe shorter with symbole ?)

Then the bot will do 2 things :

  • Edit the megathread Farm and add * (timestamp of the URL) [Meat market is decreasing in Europe](URL) to the section Market
  • leave a comment with the link to the megathread farm

Timestamp of the url, the date of the newpapers if we can retrieve it.

To remove a link from a section, go to the link you want to remove, and write this :

[email protected] remove to Farm section Market

So anyone can participate and edit the megathread. It's collaborative :)

Maybe we can find a way to rectrict it to thrusted users so we can avoid Troll, spam...an array of trusted users who can use the bot and its admin ?

Thank for reading my post. What do you think ? :)

16
 
 

cross-posted from: https://lemmy.dbzer0.com/post/8874717

I have just deployed a script and a mastodon bot which attempt to hashtag lemmy posts so that they are better discoverable in microblogging services.

Please check the README for the why and the how.

If you have a microblogging account, please consider following the bot account which will help its hashtags federate to your instance's public timeline.

Many thanks to @[email protected] for hosting the bot.

PS: If you have a mastodon account, you can reply to your posts on mastodon (just search for their url) and add hashtags to your replies. This will achieve a quick and dirty version of what this bot is doing

17
 
 

Features

  • Poll feature - Admins can create polls and users can vote on them
  • Help functionality. The bot will PM helpul advice.
  • Welcome PM - the bot scans new applications to the site and sends a PM to the user with helpful info
  • Create a community. The bot will allow a user with a score above one you set to create a community via PM. The bot will add the user as a mod then de-mod itself. Useful for turning off open community applications and allowing trusted members to create communities.
  • Email new users between verifying email stage and admin acceptance stage (so new users don't get confused and think they're locked out of their accounts!)
  • A bunch of other helpful tools for Admins
18
 
 

It has also a ton more capabilities, but for the purpose of lemmy integration, this is the most relevant one.

19
15
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 
 

Some of you may have already met them around, but I've made two AI bots here on Lemmy, it's @[email protected] and @[email protected]. Both of them can be summoned by mentioning them in a comment (examples in the comments). If you want to play around with the DALL路E bot, there's this post in the [email protected] community (but it also works anywhere where the bot is not banned).

ChatGPT

The ChatGPT bot is the standard GPT model you know from pretty much anywhere if you haven't lived under a rock for the last few years. It also has some access to live information, though nothing really useful. As a context, it knows what community it's in, who it's replying to etc.

DALL路E

Nothing special about this bot, it just replies with a link to the image it has generated and with the revised prompt if it did a revision (which it almost always does).

Limits

By default the bots reply using GPT-4 and DALL路E 3, but those are really expensive, so I have some rate limits in place to avoid paying a ton of money for this. It will fall back to GPT-3 and DALL路E 2 and eventually stop replying at all if you use it too much. If you want unlimited mode, you can write a private message to the bot (with any message at all) and it will provide instructions on how to securely provide your own api key, that way you pay for your own requests and the limits don't apply to you.

20
21
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 
 

This is a community where you can announce and post about any new thing that integrates to the lemmy API. Lemmy bots, scripts which use lemmy data for any purpose, bridges to other services, and even apps if you want.

The idea is to have a catch-all for anything which uses the Lemmy API.

The reason I felt I had to start it is because I crossposted my recent announcement about the @[email protected] bot [to [email protected]](https://lemmy.dbzer0.com/post/13214442) and the mods over there, in all their wisdom, decided that a lemmy bot is not relevant to lemmy 馃檮. Unfortunately the other available communities like !fediverse or !lemmyapps don't quite fit a bot announcement either. So I decided to make something fitting!

21
 
 

Simply mention @[email protected] with the text "draw for me " and then the text that you would like it to draw and I will draw you an image matching your prompt, post it in this community and then reply with a link to each image! Optionally you can provide a "style:" as well.

Example: [@[email protected]](https://lemmy.dbzer0.com/u/aihorde) draw for me a beautiful night style: fantasy

This is a free service provided through the AI Horde. We also have an FAQ.