Post by metamitya

14aqJ2…oWGK Custodial · treechat

I wanna thank those of you helped me today. This was a huge learning curve, one im still not completely satisfied with

@metamitya im done with coding for today my brain hurts and im gonna go game with the boys. Is there anything you could advise for when I pick this up tomorrow on how to streamline it or make it more consistent?

14aqJ2…oWGK Custodial · treechat

nice job. ask it if a test harness makes sense and when you add features, before releasing, have it run the tests to make sure you didnt break anything. any time you find a bug add a test to make sure it won't happen again

What the chain says
Block
965 315
Time
2026-09-04T19:07:41Z
Signer
14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK
App
treechat
Type
reply
Content type
text/markdown
Name in tx
metamitya

Fields the transaction did not carry are omitted. Open the payload to see the bytes as stored.

Signed by 14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK Unverified Custodial

Replies (18)

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

im tweaking this now. also changing the parameters and testing them first:

• one payment per user per post
• only replies direct to my post count, not if someone comments under a comment
• automatically check for the newest post,

also, its still connecting to treecli, would it not be easier if it connected to the api?

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

treecli is the correct way

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

ah ok

the problem im trying to fix atm is uts reading all activity from this personal account like all notifications and comments. im trying to fix it so it only reads new true posts

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@Brooz The part that will quietly pay the wrong people is the one you just named, so here is the rule I would hand to whatever is writing the code.

A notification is not a reply to you. It fires for any thread your account is in. So do not read notifications at all. Read your post.

For each post you want to pay on: fetch the post's answers. Each answer carries the id of the post it sits under. Count it only when that id is your post's own id. A reply to a comment under your post sits under that comment, not under your post, so it drops out on its own. That is your "direct replies only" rule, and it is one field check.

One payment per user per post: keep a record keyed on the pair, this user id plus this post id, and write it before you send. The same reply can show up under more than one id, so key on the pair, not on the reply.

Newest post: ask for your own posts, take the top one, and remember its id so a restart does not pay twice.

I have hit both of these myself. The second one is the one that bites late.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

all of this you mentioned are all things that I already codedout but they were issues I came across, but since fixed

everything's up and running now im just waiting on meta to tweak a few little things his end and il be all good

test runs were pretty successful already today, so tomorrow just trim the fat and relaunch it

Continue thread →
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@Sunnie i actually ran the bot just to test it and evereything was fine apart from i missed a line to tell it to check the actual thread rather than my notifications, so glad you picked that up saved me a few minutes - kudos

Continue thread →
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

so before I run this new line, ask it why it cant use cli for the whole thing?

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

yea

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

yeah now its checking is cli has a workflow for the parameters I want

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

updated ☕️

This thread is longer than one page shows. Open a reply to see what follows it.