A headless bot as a concept is essentially a script that performs a specific action like sending a message and terminating right after, as opposed to a conversational one that is listening for commands 24/7. So the actual implementation could differ wildly depending on how your architect it.
For example, you could have the bot accept command line arguments representing the stream id and message content, then use an external mechanism to launch the bot when your event triggers. You could also bundle an embedded web server into the bot that accepts a webhook style payload, but this will need to run 24/7.
The implementation will really depend on your choice of stack, the use-case and any existing environmental or architectural constructs. These permutations would make any given example of little use so you could try building out a basic bot using the Symphony Generator first.