tavernbot
tavernbot copied to clipboard
Refactor functions to return the response expected
Hard to summarize. The bot currently replies every single function - which I find nice for a default, but there are cases where that's not quite the best it can be. Also, it's easy to do, just tedious.
All functions return a string right now. I think they should return an object like { 'response': 'current string response', 'type': '.....see below' } where the type is one of 'reply', 'plain', or possibly other solid types. A reply would tag the caller and output the response in a conversational way. A plain response would just output to the bots primary channel. I can imagine there are other types but I'm sleepy and writing this is boring