aussiebroadwan / tony

The Discord Bot for the TAB
0 stars 1 forks source link

Reactions #2

Closed lcox74 closed 8 months ago

lcox74 commented 8 months ago

This PR introduces a Reactions handling system, integrating a message reactions into the rule-based architecture of Tony. Central to this update is the introduction of a reaction handler that leverages a rules system AutoPinRule which automatically pins messages that meet specific reaction criteria.

Key Features

Technical Details

The moderation rules system is now just called application rules which can handle moderations on messages or reactions. By registering reaction rules, the system can respond to reactions in a context-sensitive manner.

To integrate a new reaction rule, one simply adds a registration call such as:

bot.RegisterRules(
    framework.Rule(".*", &rules.AutoPinRule{}), // Run on all channels
)