Feature proposal: lookup specific words on autoreact#2
Feature proposal: lookup specific words on autoreact#2vincent38 wants to merge 2 commits intoasso-msn:masterfrom
Conversation
|
Hi, I think if I were to add this feature, I'd drop the PK on channel_id, so that we can have autoreacts on lookup words that are global to the whole server, and I don't want to use workarounds like setting channel_id to an empty string or something like that (which I think is what you are doing for the lookup column right now?) I'd prefer channel_id and lookup to be nullable columns, and trying to use something else as the PK |
|
Hey, thank you for your feedback. I tried to stick as much as possible to the original behavior of the bot to avoid compatibility issues, but your comment regarding the global lookup words is perfectly valid. The current logic has to rely on empty strings to bypass lookup word check when these are not defined, but this is definitely not optimal and clearly not my preferred approach. I'll take on your suggestion to assign a new field as a PK for the table, probably a number for now but let me know if you have a preference that sticks more to your daily usecases. |
Proposal for a new behavior on react command:
!react 😄 lookup_word
With this PR, it would be possible to trigger specific reacts when a lookup word is found in the message.
It is possible to provide sentences by using quotes "like in this example".
Lookup word is a new field in table, not nullable, PK on to avoid deletion errors when this feature is not in use.
Default value is "", treated as null.