this post was submitted on 08 Jun 2023
83 points (100.0% liked)

Asklemmy

1454 readers
69 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

Hi, I'm learing python and I was thinking about createing Lemmy bot.

top 50 comments
sorted by: hot top controversial new old
[โ€“] fruitywelsh@lemmy.ml 46 points 1 year ago (1 children)
[โ€“] axb@lemmy.ml 5 points 1 year ago

Beat me to it. Came here to say exactly this.

[โ€“] Tatar_Nobility@lemmy.ml 32 points 1 year ago (1 children)

Lemmygrad has a bot which detects youtube, twitter and reddit links in your post and offers links to open source front ends like invidious, nitter and libreddit. It'd be nice if we had one of those.

[โ€“] Andreas@feddit.dk 4 points 1 year ago (2 children)

I think this would work better as a built-in link filter enhancement in the instance and community options, so for example, all communities who customized their filter to replace "twitter.com" and "t.co" links will automatically convert them to "nitter.instance.com" links when the comment is posted. Link filtering can also be used to block links to scam and unknown websites.

load more comments (2 replies)
[โ€“] lvxferre@lemmy.ml 23 points 1 year ago* (last edited 1 year ago) (4 children)

I'll reply first on more general grounds. In my opinion, bots...

  • should only reply to posts/comments when explicitly requested to, through a standard approach.
  • should be properly tagged as bots, not just their username but also some interface element. And they should never behave in a way that mimics human beings.
  • should have short, succinct output, that doesn't force other users to scroll past a lot of junk.
  • should only have a descriptive output (it gives you info), not prescriptive (it doesn't tell you what to do).

Now, actually answering your question:

  • a bot that links manga, anime and LN references to MyAnimeList, MangaUpdates etc. pages, like u/Roboragi does in Reddit.
  • an unit conversion bot, like @iorale@lemmy.fmhy.ml said, that also works for cooking units. (Specially when Americans say stuff like "half cup of onions", for me it's the same as "a random amount of onion"). I volunteer myself to help out gathering units for that.
  • a simple Wikipedia link bot, that gives you a short excerpt of the Wikipedia link.
[โ€“] alex@agora.nop.chat 13 points 1 year ago (4 children)

I was thinking of running an instance which houses just bots. In theory, that'd make it easy to have an easy to remember URL and usernames, like !bgg@bot.pls or something. If I can get a URL that makes sense I might consider something like this. It'd keep it small enough to call, and make sure they're always 100% intentional.

This is mainly because I don't want to be a source of annoyance for anyone, and I've seen too many people annoyed at the "natural response" bots that pop in all the time on reddit.

If they're on their own instance, a whole instance can block that instance if they don't want bots, or block specific bots if they prefer.

[โ€“] lvxferre@lemmy.ml 4 points 1 year ago (1 children)

Or even better - what if they need to request specific bots? That is: the bot needs human consent to act on first place. That means that bots will be only used if they're clearly useful for the instance, community or the user, not just a "yeah this bot is annoying and adding noise but why bother?"

[โ€“] alex@agora.nop.chat 3 points 1 year ago* (last edited 1 year ago)

I need to do some experiments to find out what happens if a bot is tagged in a community they're not subbed to. It may be that this is exactly what I can do - it'd be a request by a user, then the mod can ban it if they want. I don't know whether I can do something where only a mod can invite, I'll have to see if there's anything that might help there

load more comments (3 replies)
[โ€“] primalmotion@lemmy.antisocial.ly 5 points 1 year ago (1 children)
[โ€“] lvxferre@lemmy.ml 5 points 1 year ago* (last edited 1 year ago)

...wow.

I just installed it. I was expecting something like "ah, it knows that a cup should be a certain amount of mililitres, but what if I ask it in grams? Then I put "1 cup sugar", "grams"... and it returned 200g. It couldn't find flour so I used butter, 226g. It works!

Checking /usr/share/units/definitions.units, the devs had the insight to add a lot of cooking stuff to it. Also a way to define your own units. The syntax is an arse but I guess that the bot could handle it.

This would be great as the "guts" of a really good conversion bot.

[โ€“] neo@lemmy.comfysnug.space 5 points 1 year ago (1 children)

r/fanfiction and r/HPfanfiction have a fanfic link summary bot. you do linkffn(STORYID) or linkao3(STORYID) and it posts a summary. was useful.

[โ€“] lvxferre@lemmy.ml 4 points 1 year ago* (last edited 1 year ago) (2 children)

I would have never guessed how to request the bot, if you didn't show it. That's another reason why I think that there should be a standard way to request bots, it increases discoverability. For contrast, Roboragi:

  • {this} looks for anime
  • looks for manga
  • ]this[ looks for light novel
  • |this| looks for visual novel

You probably wouldn't guess it from the fanfic link summary bot either.

I think that a simple common syntax that could be used is @!bot-name [options] ["]data to process["], at least when users are requesting it regardless of community. It's hard to hit it by accident, but still easy to type, and flexible enough to allow multiple bots to follow it. So for example:

  • @!fanfic-link-bot ao3 STORYID // looks for STORYID in Archive of Our Own
  • @!animanga-bot ln "story name" // looks for a light novel called "story name"
  • @!units-converter-bot grams "five cups of flour" // converts five cups of flour into grams
  • etc.

Then if community moderators are allowed to call bots to perform functions automatically, without the user requesting them, they could also set up synonyms as shorthands. for example people in c/fanfiction could simply type "ffao3 STORYID" instead, less keystrokes for the same result.

load more comments (2 replies)
[โ€“] Deebster 4 points 1 year ago (2 children)

should only reply to posts/comments when explicitly requested to

I assume you mean somelike like !remindme 4 days but then one of your examples is "half a cup of onions" and I can't see your fictional American thinking to trigger the bot - which means someone would have to reply to that person to request a bot conversion.

Similarly, there's a music IDing bot on reddit that responds to human-language questions like "whats the song" which is 100% ok with me (and the users have always been pleasantly surprised from what I've seen).

[โ€“] fruitywelsh@lemmy.ml 2 points 1 year ago

Tracking upvotes and good not/bad not replies is helpful feed back to, capturing that seem like a good idea

load more comments (1 replies)
[โ€“] tmpod@lemmy.pt 22 points 1 year ago

I'm sure something like AutoMod would eventually become useful for community moderators.

[โ€“] Austin-Philp@kbin.social 21 points 1 year ago

RemindMe was super useful

[โ€“] bigkahuna1986@lemmy.ml 21 points 1 year ago

Because none of us ever read the article anyway... autotldr bot.

[โ€“] PriorProject@lemmy.world 18 points 1 year ago (1 children)

There's no bots I'm really missing hard right now, but it's worth recalling that bots are such a popular approach on Reddit specifically because the community has no way to improve reddit directly. If you want to add a feature to reddit, the ONLY way you can do it is to try to parse the text in a post/comment and the have the bot post it's own output as a comment or whatever.

With Lemmy, the code is open source and you can improve it directly. So before writing a bot to hammer the apis of an instance reading every post/comment made to a community, it's worth asking oneself if Lemmy could be improved to natively do the thing without needing a bot. Like for remind-me, what if Lemmy had a native remind-me button that direct-messaged you with a link to a post after some configurable delay. Easier to use, more efficient, no bot needed.

Now, this might be more work than writing a bot. And a bot can be a useful way to prototype some feature. It also means learning rust and JavaScript rather than python, and it means cooperating with Lemmy devs who might have concerns about performance at-scale, maintainability, or user-experience. These concerns will likely make the result better though. It's fine to do stuff via bots, but consider the possibility that directly contributing to improve Lemmy would be a better result that isn't possible in the Reddit ecosystem.

[โ€“] alex@agora.nop.chat 5 points 1 year ago* (last edited 1 year ago)

Personally, I've been thinking about bots, but I plan to run them on my own instance or their own dedicated instance. That way, they don't add any load at all with their interactions, and only their comments are synced to other instances. That also makes it easy for whole instances or communities to kick them if they don't want them there.

[โ€“] ANapSoundsNice 16 points 1 year ago (2 children)

I saw someone attempt to invoke a !remindme bot in some other thread. I don't know if that's actually something that exists already, but that would probably be useful for people who use it.

[โ€“] Sibbo@sopuli.xyz 6 points 1 year ago

Maybe features like this could actually work as plugins.

[โ€“] Deebster 3 points 1 year ago

If it's the same post I saw, that was one of the main devs - he then mused that someone should create that bot here.

[โ€“] fruitywelsh@lemmy.ml 16 points 1 year ago (1 children)

One major bot that is fediverse specific. A community syncing bot. So if two communities from different instances want to, they could have a bot that crossposts everything between each other and delete one deleted between each other. A more advanced feature to have is to have it only do certain tags, so for example !linux@lemmy.ml with a help/question and fedora tags could be auto posted to !fedora@lemmy.ml, and !linux_questions@lemmy.ml .

[โ€“] bionicjoey@lemmy.ca 14 points 1 year ago

On that note, I'd like to see something like "crossposts" supported.

[โ€“] roizor@lemmy.ml 16 points 1 year ago (1 children)

Video/image download bot would be super useful.

I am a bot, and this action was performed automatically.

[โ€“] aqua_synonym@lemm.ee 11 points 1 year ago

You missed the bleep-bloop!

[โ€“] itchy_lizard@lemmy.ml 15 points 1 year ago

A bot that listens to and tallys "goodbott" and "bad bot" comments

[โ€“] broccoliflyinginsect@lemmy.podycust.co.uk 15 points 1 year ago (1 children)

I've always found the ones that give a Wikipedia summary useful

[โ€“] President_Pyrus@feddit.dk 5 points 1 year ago

Also the one that turned Wikipedia mobile links into desktop ones.

[โ€“] Candid_Technology_66@lemmy.ml 13 points 1 year ago (1 children)

A bot that would find the equivalent to a subreddit on lemmy, or correct users if they link a community incorrectly.

load more comments (1 replies)
[โ€“] TheGayDude@lemmy.world 12 points 1 year ago (1 children)

A repost detecting bot might be helpful

[โ€“] Candid_Technology_66@lemmy.ml 4 points 1 year ago (1 children)

there was one on reddit called reportsleuthbot But isn't it a little hard to make? It might be too complex for learning python...

load more comments (1 replies)
[โ€“] RadDevon@lemmy.ml 12 points 1 year ago

I would like to see something that converted a reference to a Lemmy community into an instance-agnostic link to that community.

But as you astutely pointed out in this post, some things would be better as improvements to Lemmy than as bots that poke at it from the outside. I think that's one of those things.

[โ€“] branchial@feddit.de 9 points 1 year ago

Amputatorbot!!

[โ€“] Evkob@lemmy.ca 9 points 1 year ago (1 children)
[โ€“] Mac@lemmy.world 10 points 1 year ago* (last edited 1 year ago) (1 children)
[โ€“] CookieJarObserver@feddit.de 8 points 1 year ago (1 children)

Nah there are many useful bots that help people.

For example unit conversion, reminders, sources, bots that get triggered when you mention a series or book or stuff like that and provide a small Summary of said thing.

We aren't talking about spam bots that plaster the place with onlyfans shit or something.

[โ€“] Evkob@lemmy.ca 4 points 1 year ago (1 children)

I didn't mean to imply that all bots are spam, or that they aren't useful in any way. I wouldn't be opposed to community-specific bots, like one that provides a series summary on a community for TV shows.

I just really don't want to have like a third of comments being bots. The community numbers are still fairly low, and Lemmy users are (for the time being, anyways) generally tech-inclined so bots could rapidly be a much too large part of posts/comments. I'm here because I want to interact with people, not bots.

[โ€“] CookieJarObserver@feddit.de 4 points 1 year ago (1 children)

Yes thats definitely true, i think bot accounts have to be marked as such anyway.

[โ€“] alex@agora.nop.chat 5 points 1 year ago

Luckily, there's a checkbox in the profile that can be enabled to mark an account as a bot

[โ€“] Mcballs1234@lemmy.ml 7 points 1 year ago

Remindme! in 10 years

[โ€“] CookieJarObserver@feddit.de 7 points 1 year ago* (last edited 1 year ago)

6-digits bot... H-Source Bot... And some of the more community specific bots.

The others have been mentioned already

[โ€“] Ruorc@lemmy.ml 6 points 1 year ago

For some LoTR flavoring, Gandalf bot is always welcome.

[โ€“] mgjade@lemmy.ml 5 points 1 year ago

I'd love to see some of the bots you'd see on sports subreddits, things like a Match Thread updating with live scores, substitutions etc, without a mod having to do all that work themselves.

[โ€“] 14specks@lemmy.ml 4 points 1 year ago

I really hope it won't be needed, but we should probably have an nwordcount bot ready to go, just in case

[โ€“] menturi 4 points 1 year ago

Are there rules on Behaw regarding allowing bot accounts?

[โ€“] deadsuperhero@lemmy.ml 3 points 1 year ago

This isn't necessarily a bot in and of itself...but, could function as one. It would be really cool if bots could reshare content from other fediverse sources into a group automatically, but preserve attribution to the original posters.

Would be really handy for, say, automatically sharing PeerTube videos to a community dedicated to watching them.

load more comments
view more: next โ€บ