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
Refactoring for Clarity and Flexibility: Updated terminology from "commands" to "applications" and implemented type masking to enhance clarity and system flexibility.
Reaction Handler via Rules System: Implemented a reaction handler that operates through a rules-based system.
Reaction Example with AutoPinRule: Added an AutoPinRule as a practical example of how the new reaction system can be applied. This rule automatically pins messages that receive a specific reaction (the pin emoji 📌) a predefined number of times, demonstrating the system's potential for automated moderation and user interaction enhancement.
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
)
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
Refactoring for Clarity and Flexibility: Updated terminology from "commands" to "applications" and implemented type masking to enhance clarity and system flexibility.
Reaction Handler via Rules System: Implemented a reaction handler that operates through a rules-based system.
Reaction Example with
AutoPinRule
: Added an AutoPinRule as a practical example of how the new reaction system can be applied. This rule automatically pins messages that receive a specific reaction (the pin emoji 📌) a predefined number of times, demonstrating the system's potential for automated moderation and user interaction enhancement.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: