cannawen / dota-gsi-discord-bot

Use Dota 2's Game State Integration API to make helpful announcements in a discord voice channel
MIT License
5 stars 2 forks source link

Rule refactor #64

Closed cannawen closed 1 year ago

cannawen commented 1 year ago

Refactor rules to take params:

label - describes the rule trigger - when these topic values are all defined and they change, run the rule given - give this information to the rule when - returns true if we should run then, false if we should not run then then - run this closure to return new facts or other side effects defaultValues - if the fact is not defined, set this fact before running the rule

Still need to break out assistants into little rules instead of having big hunks of code

cannawen commented 1 year ago

Story #61