this post was submitted on 10 Dec 2023
0 points (50.0% liked)

Python

6375 readers
38 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

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! πŸ˜…

you are viewing a single comment's thread
view the rest of the comments
[–] danielquinn@lemmy.ca 7 points 11 months ago (1 children)

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 2 points 11 months ago* (last edited 11 months ago)

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!