Ron

← All work

Group-chat bots

Live

Two bots that work where my friends already talk: one runs our fantasy football league, one sorts out pickup football.

My part
Both bots, end to end: what they do, the rules they follow and what goes live.
AI’s part
Coding agents wrote most of the code. In the football bot a language model reads messy lists; plain code draws the teams. 48 of 49 commits co-authored with an AI agent, counted 28 Nov.
The problem
Signups arrived as hand-typed lists. League scores and money lived in an app and a spreadsheet someone had to update.
Where it stands
In weekly use, and the league ledger updates itself. Time saved hasn’t been measured.

Try a stand-in for the football bot

A stand-in written for this page, not the bot.

Runs here
All three jobs, on your device, by simple rules that only handle tidy numbered lists. The demo sends your text nowhere.
Only in the real bot
LINE messages, and a language model that reads position and payment lists.

Job picked: team draw

Press “Run the demo”.

Runs on your device. This is not the bot’s code.

Problem

Pickup football signups arrive in the group chat as free text: positions, shirt numbers, payment ticks and two languages, all mixed. Someone sorted them by hand every week.

Our fantasy league has a weekly cash pot and deadlines the official app doesn’t push to where we talk. Standings and money were kept by hand.

Opportunity

Asking everyone to install another app was a poor bet. The group chat was already open, so the tool had to live inside it and understand messages the way people actually type them.

Product

Mention the bot with a list and it works out what you want. These are real chats. Names, avatars, account names and match details are covered.

The league bot answers in cards, and writes a front page for each gameweek:

🏆 Demo LeagueGameweek 9
This Gameweek
1. Alex88 pts
2. Beam61 pts
3. Chai55 pts
4. Dara49 pts
5. Eli31 pts
Overall Standings
1.
Alex FCAlex
▲590
2.
Beam FCBeam
–582
3.
Dara FCDara
▼575
4.
Chai FCChai
–543
5.
Eli FCEli
–494
The bot’s answer to “score”. Generated by the bot’s own card code for an invented league; names and scores are made up.
FPL DEVILฉบับ GW9
🗞️ ฉบับจริง • แต้มเป็นทางการ ห้ามอุทธรณ์
เทพลงประทับ!
ALEXAlex ซัด 88 แต้ม นักวิเคราะห์ทั่วประเทศขอลาออกยกแผง
👑 แชมป์วีคAlex88 แต้ม+฿60
🪦 บ๊วยวีคEli23 แต้ม-฿60
อัปยศ!
Eli 23 แต้ม แฟน FPL ทั่วโลกร่วมไว้อาลัย 1 นาที
อ่านเกมขาด!
Alex เลือก Okafor เป็นกัปตัน ได้ไป 28 แต้ม เพื่อนๆ แอบจดโน้ต
กัปตันทรยศ!
Brandt ให้ Eli แค่ 1 แต้ม เอาปลอกแขนไปใส่ให้แมวยังคุ้มกว่า
พลิกบัลลังก์!
Alex ยึดจ่าฝูงจาก Dara ล่าสุด Dara ขอตัวไปทบทวนแท็คติกเงียบๆ
ดิ่งเหว!
Dara ร่วงจาก 1 ไป 3 หุ้นตัวนี้ขอเทขาย
ตารางคะแนนรวม
🥇Alex▲2590
🥈Beam–582
🥉Dara▼2575
4.Chai–543
5.Eli–494
* ข่าวลือทั้งหมดเกี่ยวกับฟุตบอลเท่านั้น โปรดใช้วิจารณญาณในการเสพ
The bot’s “meme of the week”: a Thai tabloid front page written from the gameweek’s numbers. Generated by the bot’s own code for an invented league; names and scores are made up.

Process

The calls that mattered:

Use a model only where rules fail.
Reading free-text names and positions needs a language model. Drawing teams is ordinary random code, and a few patterns decide which job a message is.
A pasted list is data, not instructions.
Both prompts say so, because anyone in the group can type anything into that message.
Encode the pitch rules.
Goalkeepers don’t pay, so they never appear on the unpaid list.
No money until the week is final.
The live front page shows positions only. Payouts appear once scores are settled, and players still tied after tiebreaks share the prizes.
Same week, same jokes.
Headlines are picked from written templates with a seed per gameweek, so a rerun doesn’t change the story. The rule: mock the decisions, never the people.
Nobody should memorise commands.
Every league reply carries tap buttons, which also work without mentioning the bot.

Build

  1. In

    • LINE group messagebot is mentioned or a button tapped
    • ScheduleFriday 09:00 digest, daily recap check
  2. Cloudflare Worker

    • Check the signature
    • Route the requestpayments, teams, positions, league
  3. Do the work

    • Language modelreads messy lists
    • Plain codeteam draw, scores, payouts
    • Public FPL data and KVlive points and the ledger
  4. Out

    • Text or rich cardback into the chat

In the football bot, a list with ticks goes to the payment check, a list headed “Participants” goes to the team draw, and anything else is sorted by position.

Technology

Workers over an always-on server
The football bot started as a Node server and moved to a Worker. The league bot deploys itself when a change is merged.
Rich cards for the league
Standings and money are tables, so they are sent as LINE Flex messages built in code.

Outcome

Both are part of the weekly routine: the list gets sorted in the chat, and the league’s ledger keeps itself. I haven’t measured how much time either saves.

Proof

  • 33commits on the league bot
  • 16commits on the football bot
  • 104reads on one signup message

Commits read from the repositories on 28 Nov 2026. The read count is visible in the Sep 2026 screenshot above; it shows who saw one message, not what the bot achieved.

Let’s talk.

About product, strategy and operations, technology, or anything you see here.