This is a small project, a naive and simple framework for building nostr bots. I'm hoping to make it public as soon as possible, as a proof of concept, and use it to automate some tasks.
The idea is that bots can implement one or more commands C1,..., Cn. You can define
  1. the execution order C1 < C2,3, i.e. C1 has to be executed before C2,3
  2. The security model, i.e. a whitelist of users who can execute the command, based on npub, nip05 (-domain), or configurable groups of npubs/nip05 (-domains)
Users interact with the bots via DM conversation, and a botrunner parses and interpretes the DM, then validate the data, and perform additional checks before executing the invoked command.
Examples:
  1. A bot that sends a greeting to a nostr user, can be invoked with the DM text "!hello npbub1..." The bot executes the command hello, with the npub as parameter, which creates a message, tagging the npub, with the content "Hello“
  2. A human verification bot for anyone to interact with, and verify they are human. The bot will issue badges to confirm humanness once the verification completed.
This will be released as a java library.