Made my first Python anything!
from doctorn@r.nf to python@programming.dev on 10 Dec 2023 06:48
https://r.nf/post/268124

Made a Mastodon bot using Mastodon.PY and I’m so happy it works! 😅

I just got this random idea in my head and decided to see if I could create it, so I built a working slots that uses the 4 image uploads to show the results. It will automatically grant you 10000 Coins the first time and playing costs 50 coins per play. The prices go from 25 to 750, every play adds 25 into the jackpot that starts at 500 when it gets won and 4 jokers will give jackpot. It will say the results in text too and it saves all wallet-amounts to file too which it can load back on restart however it gets killed. 😅

Sorry, just wanted to share this somewhere. 😅 I hope it’s fine here.

I am however not really promoting it, not even sure how it will do under pressure (probably get throttled by Mastodon eventually) and it might either stop working or switch account to one of it’s own (it’s currently just using a personal infobot for testing) depending how it goes… I’m assuming if I give it a 5 plays per day per user limit it could be manageable… 🤷‍♂️

(If you still want to try it, please do not abuse or spam it or I will have to take it offline, but the command to play on Mastodon is: “@infobot@fed.ggtm.eu !slots”

Anyway, thanks for reading about my victory! 😅

#python

threaded - newest

danielquinn@lemmy.ca on 10 Dec 2023 09:13 next collapse

Congratulations! That feeling of “I built a thing!” never gets old. If you’d like some help troubleshooting or would like a coffee review, feel free to post a link to the source here.

doctorn@r.nf on 10 Dec 2023 18:15 collapse

I was thinking of putting it online for use by others, open-source, of course. The pictures are easily replacable by anything you want. (though I should use a bit more variables that can easily be set on top of the file for easy personalisation. For now the ‘access token’ and instance you want to use are already there, and the image links right below, but it could get a bit more oversight.)

I did comment everything the script does, as I saw that seems to be common habit.

I will soon paste a link when I cleaned it up a bit. I’m just happy it works exactly as I wanted it to for now. I’ll prob. be putting it online starting next week or so. 😁

Thanks for the possitive comment!

Turun@feddit.de on 10 Dec 2023 10:25 collapse

The lady pics are cute, but also pretty sexist. Especially the joker one. Like wtf is this an nsfw instance?!? You should at least go 50/50 woman/man, or ideally choose more neutral pictures to begin with.

doctorn@r.nf on 10 Dec 2023 18:08 next collapse

Sorry, not taking part in that nonsensical logic.

Maybe open a dictionary and look up the word Sexist,… Sexual is not the same thing. 😜 You do realize how the human race reproduces right?

Anyway, the pics are by an artist I know, especially made for this. And I couldn’t care less about “woke” Karen comments. 😅

No offense though, but it just shows no style to keep doing this, and certainly holds no ground with me. 😜

If you feel like breaking down other people’s achievements for unrelated issues you have, please stay off the internet. It’s dangerous out here. 😅

Have a great day!

[deleted] on 10 Dec 2023 18:11 next collapse
.
sugar_in_your_tea@sh.itjust.works on 10 Dec 2023 19:36 next collapse

This is kind of a weird response to make to someone’s first project. I don’t know about you, but I honestly don’t pay any attention to the images and whatnot I use in a small personal project, I just use whatever I have.

The interesting thing here is that OP built a thing and wants to share it. As OP mentioned elsewhere, the images can be easily replaced with something else, yet you jumped to criticism instead of asking. That seems kinda weird to me.

My coworker shared a game they made with the broader team, and while they game had lots of glaring issues (e.g. controls sucked, graphics were basic, etc, but hey, gender was balanced), the team was consistently supportive because this was something they had never done before. My response was to merely ask constructive questions, like what they found most challenging, what they’d like to work on next, etc.

So yeah, I guess I’m surprised that you decided pointing out the gender of the two people in the images was the most constructive thing you could post about. That is all.

Turun@feddit.de on 14 Dec 2023 18:09 collapse

The images can be easily replaced with something else, yet OP used nsfw pics instead of whatever. That seems kinda weird to me.

the team was consistently supportive

There is a certain correlation with the use of borderline pornographic content, you know? I dare you to present OPs project at work.

sugar_in_your_tea@sh.itjust.works on 14 Dec 2023 19:49 collapse

They’re not nsfw. They’re not my first choice, but I wouldn’t be all that embarrassed if a coworker saw it. I see women (and men for that matter) in more revealing attire exercising in public, it’s really not an issue.

Turun@feddit.de on 15 Dec 2023 08:40 collapse

I now realize that OP posted a select few, safe for work images here on Lemmy.

The joker one im talking about is this one: <img alt="" src="https://cdn.masto.host/fedggtmeu/media_attachments/files/111/566/629/459/550/195/original/5505dd45f0c1d22b.jpg">

(In case I didn’t get the image embedding right, here is the image as a regular link: cdn.masto.host/fedggtmeu/…/5505dd45f0c1d22b.jpg)

sugar_in_your_tea@sh.itjust.works on 15 Dec 2023 13:25 collapse

That one is certainly more risqué, but I don’t consider it pornographic. While I’d be a little embarrassed (esp since I work with a few women within eyeshot), I don’t think I’d get into any trouble, provided I don’t linger on the pictures.

That said, it seems the only way you get to it is by actually using the app and getting the jackpot. From the initial post and landing page, it’s obvious the kind of pictures OP would be using, so I would just not actually try out the app at work.

good_girl@lemmy.blahaj.zone on 12 Dec 2023 08:08 collapse

The replies you got are eye opening.

Very nice to see that the programming space is still very much a boy’s club. 🙄

This guy’s posting history is full of misogynistic drivel so his response checks out i guess.

He also compared watching CSAM to watching cat videos LMFAO. What a gross ass dude.

Turun@feddit.de on 14 Dec 2023 18:10 collapse

Thanks. The upvotes are in my favor, but the loud minority posting comments is, well, loud. So thank you.