File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js';
69
69
import { SlashCommandAbortController } from './slash-commands/SlashCommandAbortController.js' ;
70
70
import { SlashCommandNamedArgumentAssignment } from './slash-commands/SlashCommandNamedArgumentAssignment.js' ;
71
71
import { SlashCommandEnumValue , enumTypes } from './slash-commands/SlashCommandEnumValue.js' ;
72
- import { POPUP_TYPE , Popup , callGenericPopup } from './popup.js' ;
72
+ import { POPUP_RESULT , POPUP_TYPE , Popup , callGenericPopup } from './popup.js' ;
73
73
import { commonEnumProviders , enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js' ;
74
74
import { SlashCommandBreakController } from './slash-commands/SlashCommandBreakController.js' ;
75
75
import { SlashCommandExecutionError } from './slash-commands/SlashCommandExecutionError.js' ;
@@ -2474,7 +2474,8 @@ async function buttonsCallback(args, text) {
2474
2474
/** @returns {string } @param {string|number|boolean } result */
2475
2475
function getResult ( result ) {
2476
2476
if ( multiple ) {
2477
- return JSON . stringify ( Array . from ( multipleToggledState ) . map ( r => resultToButtonMap . get ( r ) ?? '' ) ) ;
2477
+ const array = result === POPUP_RESULT . AFFIRMATIVE ? Array . from ( multipleToggledState ) . map ( r => resultToButtonMap . get ( r ) ?? '' ) : [ ] ;
2478
+ return JSON . stringify ( array ) ;
2478
2479
}
2479
2480
return typeof result === 'number' ? resultToButtonMap . get ( result ) ?? '' : '' ;
2480
2481
}
You can’t perform that action at this time.
0 commit comments