File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/commands/moderation/prefixCommands/functions Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -166,14 +166,21 @@ export async function handleSetPrefixCommandContent(interaction: ChatInputComman
166166 time : 120000 ,
167167 } ) ;
168168
169+ title = modalSubmitInteraction . fields . getTextInputValue ( 'commandContentTitle' ) . trim ( ) ;
170+ content = modalSubmitInteraction . fields . getTextInputValue ( 'commandContentContent' ) . trim ( ) ;
171+ image = modalSubmitInteraction . fields . getTextInputValue ( 'commandContentImageUrl' ) . trim ( ) ;
172+
173+ if ( ! title && ! content && ! image ) {
174+ await modalSubmitInteraction . reply ( {
175+ content : 'You did not provide any content information and the change was not made.' ,
176+ ephemeral : true ,
177+ } ) ;
178+ return ;
179+ }
169180 await modalSubmitInteraction . reply ( {
170181 content : 'Processing command content data.' ,
171182 ephemeral : true ,
172183 } ) ;
173-
174- title = modalSubmitInteraction . fields . getTextInputValue ( 'commandContentTitle' ) . trim ( ) ;
175- content = modalSubmitInteraction . fields . getTextInputValue ( 'commandContentContent' ) . trim ( ) ;
176- image = modalSubmitInteraction . fields . getTextInputValue ( 'commandContentImageUrl' ) . trim ( ) ;
177184 } catch ( error ) {
178185 //Handle the error if the user does not respond in time
179186 Logger . error ( error ) ;
You can’t perform that action at this time.
0 commit comments