discord-needle icon indicating copy to clipboard operation
discord-needle copied to clipboard

🐛 Configure command overrides optional parameters even if not specified

Open MarcusOtter opened this issue 2 years ago • 3 comments

Describe the bug

The /configure auto-threading command has optional paremeters, such as include-bots and custom-message for example. If these options are left out when running /configure auto-threading, they will be set to the default value. This is annoying for example if users have set up a long custom message, but then remembers that they need to change another setting. The setting change would remove their custom message, so they have to write the entire command again.

Solution: Instead of setting them to the default values, set them to the current values (or default if there are no current values).

Steps to reproduce the bug

  1. /configure auto-threading channel: #general custom-message: Here's a very long message!\n\nI sure hope I don't have to type this again.
  2. /configure auto-threading channel: #general include-bots: true
  3. Send message in #general
  4. Thread is not made with custom-message, it uses the default one

Expected behavior

Expected: custom-message is used for the auto-thread Actual: The command on step 2 overwrote the custom-message to the default one since it was not provided

MarcusOtter avatar Mar 15 '22 21:03 MarcusOtter

Sounds like a usecase that modals with selects would fix.

c43721 avatar Jul 14 '22 23:07 c43721

For sure!

MarcusOtter avatar Jul 14 '22 23:07 MarcusOtter

image image

By reading the config first then applying null coalescing, we would fix this issue. We can solve that now if we require a quick patch.

Otherwise, wait for modals.

c43721 avatar Jul 15 '22 00:07 c43721