billbot/doc/roadmap-bot.md

1.7 KiB

UX Plan

contingent upon what the Matrix client <-> server protocol makes available, below is an example of how this bot might work:

  1. open a payment channel with some other individual, if you & he have no history of transactions.
  • DM @billbot:uninsane.org with a message in format: > !transact @user:host [...]
  • the billbot will create a room with itself, you, and all listed users.
  1. in this room, any user may post a message of the format

!request @user:host [...] $NNN.MM

  • the bot will post in the group a message to acknowledge each transfer: > @user:host owes @other:host $NNN.MM
  1. request to see your position(s):

!position [@user:host [...]]

  • the bot will post your position.
  • you can initiate this from any DM involving the bot. so other parties don't need to see the bot's response, but still can, if you send this message to the group.
  1. mark a debt as paid:

!sent @user:host $NNN.MM

  • bot will post in the same room: > @user:host paid @other:host $NNN.MM
  • maybe state the remaining position? > @user:host now owes $other:host $X.YY

Mechanics

  • on bot start, it crawls messages of every room it's in and replays the bang commands to determine positions.
  • only one bot in the room should respond to the messages (simply to ACK that they're formatted correctly);
  • but any user can run this same bot in read-only mode, either passing it creds to the user's own account or (less practically) by creating a new bot user and inviting it to the relevant rooms. - this provides some redundancy and more importantly allows any of us to deploy the bot, when developing, to the same environment used for prod.