tonyjunkes / toki-clj

An IRC chat bot for Twitch built on ClojureScript, Node and friends.
Eclipse Public License 1.0
3 stars 0 forks source link

Structure commands to be more dynamic/pluggable #2

Open tonyjunkes opened 5 years ago

tonyjunkes commented 5 years ago

Right now the example command (!dice) has a function and direct check on the msg value stored in core.cljs.

It would be nice to break out the command's functionality into a separate cljs file and incorporate another method of storing "active" commands. When a message is intercepted, it will then be checked/matched from the obtained list of available commands. This opens up more flexibility for switching them on/off instead of going and updating code.