discord-needle
discord-needle copied to clipboard
🐛 Configure command overrides optional parameters even if not specified
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
-
/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.
-
/configure auto-threading
channel: #general
include-bots: true
- Send message in #general
- 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
Sounds like a usecase that modals with selects would fix.
For sure!
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.