whyrusleeping / hellabot

A hella awesome irc bot framework written in go, Simply plug in your triggers and run!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal: Stateful Store in Bot struct

bbriggs opened this issue · comments

I've been using (wrapping, really) Hellabot for a while in bitbot and hacking around the lack of a stateful store by making bot a global (gross). I'd like to let triggers have access to a stateful store and methods via hbot.Bot so that they don't have to go outside their scope for this sort of thing.

bbolt is a pure-go key/value store that has been working well for my use case and one I'd recommend if this proposal moves forward.

I know adding fields to the struct can be a painful thing so I'm open to alternatives here. In the meantime, I'm going to fork and play around with this idea on my own branch like I did last time with NamedTriggers.

I think a storage solution is out of scope for this project.