Commit Graph

4 Commits

Author SHA1 Message Date
73c5f58243 WIP: Move to using modules for implementing core behavior
Since modules can now intercept all messages in the channels they're
listening for, it'd be cool to have modules handling things like making
sure the Omnibot.State stays updated as appropriate, and that pings are
ponged, etc.

This will probably deprecate the router, since it's been reduced to a
single function call, but we'll see about that.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-13 16:04:19 -04:00
5f251d22ce Remove IO.inspect that was included in the last commit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-13 15:22:12 -04:00
ed22d1bf0f Update modules to be more egonomic, add command macro
Modules are now defined using on_{msg,channel_msg,join,part,kick}.
Additionally, commands can be defined using a convenient macro.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-13 15:20:00 -04:00
e2e7ae22b8 Add Omnibot.Module
Modules can easily be defined with `use Omnibot.Module`.
Omnibot.Contrib.Fortune has been updated to use this.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-12 18:24:11 -04:00