BraveNetwork / LinBot

Open source, general-purpose Discord chat bot written in C#
https://bravenetwork.github.io/
MIT License
2 stars 0 forks source link

Bug with .crca and global custom reaction #17

Open 23nd opened 6 years ago

23nd commented 6 years ago

Navi King - 03/06/2018

There's a bug wherein if .crca is enabled for a global custom reaction you can't overwrite it at the server level.

This may not be a bug so much as it is an intended behavior, according to Nadeko Issue 1886

If you know .crca is enabled for the global custom reaction, temporarily disable it, make your change, and then re-enable it.

Navi-King commented 6 years ago

The problem was that as soon as I reenabled it, it stopped being blocked. So it was like

  1. Disable .crca
  2. Now the custom reaction can be overwritten at the server level
  3. Reenable .crca
  4. The server custom reaction will still overwrite the global one if the global one is used by itself, but when used as part of a larger message still triggers the original global custom reaction

Sincerely, Sean McNulty

On Wed, Mar 14, 2018 at 5:20 PM, Natalie Diebold notifications@github.com wrote:

Navi King - 03/06/2018

There's a bug wherein if .crca is enabled for a global custom reaction you can't overwrite it at the server level.

This may not be a bug so much as it is an intended behavior, according to Nadeko Issue 1886 https://github.com/Kwoth/NadekoBot/issues/1886

If you know .crca is enabled for the global custom reaction, temporarily disable it, make your change, and then re-enable it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NetworkFrontier/LinBot/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/ARCTRfangygMBy8f3SbEsDOw8jaBaJheks5teYm7gaJpZM4SrMaQ .

23nd commented 6 years ago

I see, so with an example:

  1. Create global custom reaction MyReaction Original (1)
  2. Enable .crca 1 (MyReaction Original)
  3. Disable .crca 1 (MyReaction Original)
  4. Overwrite MyReaction Original to MyReaction Overwritten at server level (2)
  5. Enable .crca 1 (MyReaction Original)

What you described as being a problem is the intended behavior. The Original (1) will appear in sentences (according to .crca) while the Overwritten (2) will appear in the source server's custom reactions.

If you want MyReaction Overwritten to appear in sentences in the source server, wouldn't you just need to do .crca 2?

NOTE: I say "overwritten" but in reality the Original (1) and Overwritten (2) are separate records in the database and do not interfere with each other. Overwritten (2) will only be used in its source server, with its own .crca settings. Original (1) will be used globally according to its own .crca settings.

23nd commented 6 years ago

Unless you're saying that you want neither Original (1) nor Overwritten (2) to appear in sentences in 2's source server, in which case we'd some way of telling Nadeko to ignore a specific global reaction if its trigger matches a server reaction.

Navi-King commented 6 years ago

So I guess the crux of the problem is that, as far as I know, no one can overwrite a .crca reaction at server level. Essentially they just create a new custom reaction with the message specific trigger that would overwrite a global message specific trigger, but will never overwrite a crca trigger. What I would like to happen then is a way for users to disable a .crca enabled reaction at the server level, either by being able to toggle it with .crca (or a custom equivalent so we don't interfere with Kwoth's) or being able to overwrite it with .acr somehow.

Sincerely, Sean McNulty

On Wed, Mar 14, 2018 at 6:10 PM, Natalie Diebold notifications@github.com wrote:

I see, so with an example:

  1. Create global custom reaction MyReaction Original (1)
  2. Enable .crca 1 (MyReaction Original)
  3. Disable .crca 1 (MyReaction Original)
  4. Overwrite MyReaction Original to MyReaction Overwritten at server level (2)
  5. Enable .crca 1 (MyReaction Original)

What you described as being a problem is the intended behavior. The Original (1) will appear in sentences (according to .crca) while the Overwritten (2) will appear in the source server's custom reactions.

If you want MyReaction Overwritten to appear in sentences in the source server, wouldn't you just need to do .crca 2?

NOTE: I say "overwritten" but in reality the Original (1) and Overwritten (2) are separate records in the database and do not interfere with each other. Overwritten (2) will only be used in its source server, with its own .crca settings. Original (1) will be used globally according to its own .crca settings.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NetworkFrontier/LinBot/issues/17#issuecomment-373191854, or mute the thread https://github.com/notifications/unsubscribe-auth/ARCTRQ3AlcNCO3pcxz7-Xb-kiN_KbpyOks5teZVIgaJpZM4SrMaQ .

23nd commented 6 years ago

Well you can half-overwrite a .crca trigger. You can overwrite by turning the server reaction's .crca on, but you can't turn global .crca off at server level.

Navi-King commented 6 years ago

Yeah, turning global .crca off at a server level was something I was wanting/expecting to happen.

Sincerely, Sean McNulty

On Wed, Mar 14, 2018 at 6:27 PM, Natalie Diebold notifications@github.com wrote:

Well you can half-overwrite a .crca trigger. You can overwrite by turning the server reaction's .crca on, but you can't turn global .crca off at server level.

It looks like whatever Kwoth did in Nadeko Issue 1549 https://github.com/Kwoth/NadekoBot/issues/1549 might have affected your expected behavior.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NetworkFrontier/LinBot/issues/17#issuecomment-373196022, or mute the thread https://github.com/notifications/unsubscribe-auth/ARCTRWmmrkZGPq6cccdohQh6snkrXHseks5teZlggaJpZM4SrMaQ .

23nd commented 6 years ago

Actually it seems this behavior was never supported. The CustomReactionService first checks for a match in server reactions, and if none match, it checks for a match in global reactions. There is no true blocking of a global reaction, just priority for messages matching server reactions.

I will submit this as an issue to Nadeko for now.

23nd commented 6 years ago

Now being tracked as Nadeko Issue 2172