Brooz ¡
Gm @Treechat frens đł
A few people have asked how the bots run so I took the vital steps from each and tried to explain them as simply as I could.
All the coding was done using Python in Replit with help from Chatgpt to double check lines I wasnt sure on and provide some of the code i didnt know. A lot of processes were tested first before they went live although there were still a lot of bugs in the early stages. The BSV community helped find erros by commenting and 'breaking' the bot which meant then editing either the full fresh block of Python code or just altering specific lines.
I also had a lot of help and feedback from @metamitya such as updates to the TreeCLI or help on the best way to achieve certain tasks I wanted to achieve.
Enjoy this thread below âď¸
Replies
Brooz ¡
1/7
⢠How it knows whoâs already been paid
Every successful GM payout gets saved to a local record with the post ID and user ID. Before paying anyone, the bot checks that record so the same person canât be paid twice on the same post.
⢠How it knows how much is in the pot
The bot connects to the Treechat wallet balance and reads the current live satoshi balance directly.
⢠How it knows how much has been paid out
Every confirmed payout is saved in the payout history. The bot adds those confirmed amounts together to calculate total sats rewarded.
Brooz ¡
2/7
⢠How it makes the daily data summary
It combines three things tondo this - confirmed GM payouts, current wallet balance, and how many full 27,257 sat tips are still affordable. It then generates the dashboard image I designed from those live numbers.
⢠How it knows if a payment failed
The bot waits for a confirmed successful response before marking someone as paid. If it gets a definite error, it records that the payment wasnât confirmed instead of pretending it worked.
⢠How it knows someone has commented
It repeatedly checks the 5 most recent qualifying âReply GMâ posts and reads the replies underneath them. Direct comments to the post only, not a reply to a comment on said post. If a new direct reply matches Gm in any capitalisation with an emoji or text after it, it processes that user.
Brooz ¡
3/7
⢠How it knows when the post limit has been reached
It counts how many successful tips have already been sent for that specific post. Once it reaches 25, it stops paying from that post.
⢠How the âlimit reachedâ message works
After the cap is hit, the bot can automatically reply with a message telling people that post is finished and to find another recent GM post.
⢠How the âalready tippedâ message works
If the same user tries again on the same post, the bot sees their user ID in the payment record and automatically tells them theyâve already been tipped there.
Brooz ¡
4/7
⢠How the dashboard knows how many tips are left
It takes the current wallet balance and divides it by 27,257 sats. That gives the number of full GM tips the pot can still fund.
⢠How the bot auto-posts updates
A separate poster process runs in the background and checks the latest data on a schedule. When a daily roundup, milestone, or low-pot condition is met, it generates the image and posts it automatically.
⢠How milestone posts work
The bot tracks the last milestone it announced. When the total rewarded replies passes the next 25-user milestone, it can post a fresh update.
Brooz ¡
5/7
⢠How the low-pot alert works
It checks how many full GM tips remain. If that drops below the chosen threshold, it posts a warning once rather than repeating it every check.
⢠How it avoids spamming Treechat
The bot checks data regularly, but it doesnât post every time. It only posts on the daily schedule or when something meaningful changes.
⢠How the image itself is made
The bot uses a fixed Brooz Tipz dashboard template that i designed and uploaded to the main project file and replaces only the live numbers. Everything else in the design stays the same.
Brooz ¡
6/7
⢠How the Treechat tag works
The post uses a proper structured Treechat mention rather than just typing â@Treechatâ as plain text.
⢠How the different bots and functions stay separate
The GM payment bot and the dashboard poster are separate processes. One handles replies and payments while the other handles stats and automatic posts.
⢠What happens if the bot restarts
It keeps state files that remember things like previous payouts, milestones, and alerts. Restarting doesnât wipe that history.
Brooz ¡
7/7
I hope this was helpful or interesting to some, and hopefully inspired others. This took me around 3 days to finally get to a point where I can just leave it running by itself and a lot of trial and error. Again i want to thank those that helped me with the project. I have a lot more ideas and projects planned....im just getting started âď¸
Thank you for the continued support đ
LoadedM3dia ¡
Be productive today
J1Pelaez ¡
GM
Brooz ¡
gm ser altho this isn't a claimable post please see my most recent post
https://app.treechat.com/s/5c944b93-7a2d-402e-82c5-8561457a474d