eniko,
@eniko@peoplemaking.games avatar

since im getting so many messages im starting to wonder if i should make a bot that boosts people who make stuff. but also, i have absolutely no clue how i would make such a thing

any of my tech brethren have any idea how easy/hard this would be?

mai_lapyst,
@mai_lapyst@soc.saiyajin.space avatar

@eniko First thing: hi! :3

A bot itself that boosts isnt that hard, but programming knowlege is definitively required. And It ofc depends on what you want your bot to do: should it post as yourself or as its own entity? Should it be able to detect things you dont want to boost (aka a "bad stuff" filter).

The maybe complicated thing tho would be running it since it then would need some sort of server (if you want it to run 24/7 that is. else a normal PC would be fine here)

Hope I could help you a little bit! :3

eniko,
@eniko@peoplemaking.games avatar

@mai_lapyst i'm a coder so i should be able to handle the code >_> atm i would settle for a python script or something that takes a link to a local version of a post and boosts it as my account

mai_lapyst,
@mai_lapyst@soc.saiyajin.space avatar

@eniko Thats good, that definitivly makes things easier xD Python should be enough to handle this task; also there are two implementations for python so speaking to mastodon shouldn't be a issue :3 And a link isnt neccessary, the post's ID totally is enough for the python sdk's.

deepbluev7,

@eniko You are probably dealing with replies to your one post, so I guess you could:

I'd probably just put it in a script with some local file to store what you approved or disapproved for boost already and then just boost the first one in the list whenever you run it and have a second script to list and add stuff.

eniko,
@eniko@peoplemaking.games avatar

@deepbluev7 atm im manually collating all the posts into a private discord channel and then manually boosting one every N minutes 😩

deepbluev7,

@eniko I mean, then you have half the bot already done, now you "just" need to automate it. Start simple by trying to make it easier to list and filter the posts, then later replace the boosting step (or the other way around). You can keep some of the manual steps for quite a while :)

eniko,
@eniko@peoplemaking.games avatar

@deepbluev7 atm i would settle for a python script or something that takes a link to a local version of a post and boosts it as my account >_>

deepbluev7,

@eniko If you input the right data, call .split on the url, then do POST /api/v1/statuses/:id/reblog where id is the last part of the url you split. You need more fancy stuff if the last part of the url sometimes is not the post id. :)

eniko,
@eniko@peoplemaking.games avatar

@deepbluev7 that sounds feasible

deepbluev7,

@eniko You can probably use https://github.com/halcy/Mastodon.py to handle the authentication (or steal a token from your browser) and it can also boost stuff, I guess, see https://mastodonpy.readthedocs.io/en/stable/05_statuses.html#mastodon.Mastodon.status_reblog (id should be the same). You can also show the toot on the commandline first to check, if it resolved the id correctly (which also doesn't need auth).

zippy1981,
@zippy1981@hachyderm.io avatar

@eniko python script that does sentiment analysis. Feed that you stream of maker. Toots. If it decides it's about making stuff boost it.

I mean you could do sentiment analysis in any language I guess

dodgy_bagel,

@eniko

It could be done, although auto boosting might run afoul of server rules.

What criteria would be sufficient to trigger a boost?

eniko,
@eniko@peoplemaking.games avatar

@dodgy_bagel i figure when someone @'s the bot and they haven't been boosted before and have less than X followers, they go into a queue. the bot boosts posts from the queue every Y timespan

dodgy_bagel,

@eniko

So like, if there were multiple such bots I could just make a message with nothing but https://tech.lgbt/@s and it would be boosted to infinitely, but only once per account?

eniko, (edited )
@eniko@peoplemaking.games avatar

@dodgy_bagel i mean i'm not sure why there'd be multiple bots like that, i'd just be running the one myself

dodgy_bagel,

@eniko

Just checking if I got the concept right.

I'm not familiar with mastadon bots in particular, but the actual mechanics of the bot are dead simple.

It would be one of the easiest bots to code.

esdin,
@esdin@peoplemaking.games avatar

@eniko It's not too hard, and there's already a few frameworks / templates up on github. Made one using Mastodon4j a few years back.

eniko,
@eniko@peoplemaking.games avatar

@esdin what language do they use? would i need some kind of web hosting for it?

esdin,
@esdin@peoplemaking.games avatar

@eniko You'd want to host it somewhere for uptime, yeah. Also each "bot" is a bot account somewhere, and a lot of bot-only instances get suspended.

https://happycoding.io/tutorials/java/libraries/mastodon4j

esdin,
@esdin@peoplemaking.games avatar

@eniko I've seen folks write them in java, python3, Go, etc. The Mastodon API itself is just a bunch of web queries

eniko,
@eniko@peoplemaking.games avatar

@esdin well, at it'd need to do is keep a running list of users that have been boosted before, and put posts from users who @ the bot with less than X followers into a queue that it boosts one from every Y minutes

eniko,
@eniko@peoplemaking.games avatar

@esdin actually for my current predicament, how hard would it be to rig up like a python script or something that takes a pmg post link and boosts that post?

esdin,
@esdin@peoplemaking.games avatar

@eniko Haven't tried anything like that myself; probably not too tough? Esp. if you're doing it by monitoring replies to a given post or set of posts.

eniko,
@eniko@peoplemaking.games avatar

@esdin yeah i can collate the set of links myself i just want to automatically empty the boost queue

scm,
@scm@sfba.social avatar

@eniko @esdin I wrote a bot in Python just this week 😆 it’s not the best code, but it’s pretty simple: https://gitlab.com/stevenmcdonald/greatoldbot/-/blob/main/greatoldbot.py

That runs hourly to post to @GreatOldBot

There is also a Mastodon Python library, but personally I’d rather just post to the API directly than pull in a library for something this simple

The API is pretty well documented at docs.joinmastondon.org

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • tacticalgear
  • DreamBathrooms
  • mdbf
  • InstantRegret
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • Durango
  • rosin
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ethstaker
  • JUstTest
  • cubers
  • cisconetworking
  • normalnudes
  • modclub
  • everett
  • osvaldo12
  • GTA5RPClips
  • Leos
  • anitta
  • tester
  • provamag3
  • megavids
  • lostlight
  • All magazines