crycode-de / ioBroker.discord

ioBroker Discord bot integration
MIT License
6 stars 4 forks source link

slash commands can't be saved #56

Closed mamica-star closed 1 year ago

mamica-star commented 1 year ago

Describe the bug
After adding a custom slash command, the save/saveAndClose buttons are active but no save is performed. I can leave the settings only by selecting a other item in the menu. Then the promt "discard changes" appears.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Commands' tab
  2. Enable 'custom commands'
  3. Click on '+'
  4. fill name and description
  5. click on 'save'
  6. no save is performed

Expected behavior
I expect the new command is created.

Versions:

crycode-de commented 1 year ago

Which version of Admin do you have installed?

Are the save buttons enabled or disabled? If disabled, the form validation found an error in your inputs.

If the buttons are clickable... can you check the browser console (F12) if there are any errors logged?

mamica-star commented 1 year ago

Admin-Version: 6.10.1

The save buttons are enabled.

iob-test is a existing and running command. The call stack shows the error after adding a new one mynewcommand without parameters and saving it.

<TOKEN-DELETED> instrument.ts:144
<empty string> instrument.ts:144
👍 instrument.ts:144
<empty string> 2 instrument.ts:144
iob-test instrument.ts:144
Test-Befehl instrument.ts:144
opt01 2 instrument.ts:144
nynewcommand instrument.ts:144
myNewCommandDesc instrument.ts:144
Uncaught (in promise) TypeError: s is null
    value JsonConfig.jsx:415
    value JsonConfig.jsx:418
    value JsonConfig.jsx:428
    value JsonConfig.jsx:426
    t JsonConfig.jsx:478
    Babel 9
    value JsonConfig.jsx:519
    onSave JsonConfig.jsx:577
    onClick SaveCloseButtons.js:84
    React 11
    o helpers.ts:98
JsonConfig.jsx:415:32
crycode-de commented 1 year ago

This is an issue of the admin adapter. It's already fixed in the latest admin version. Tested with admin 6.10.4 and here it's working as expected.

mamica-star commented 1 year ago

Thank you!