@@ -57,6 +57,10 @@ const DISCORD_LAUNCHER_COMMANDS = [
5757 name : "setting" ,
5858 description : "Open Ode settings" ,
5959 } ,
60+ {
61+ name : "settings" ,
62+ description : "Open Ode settings" ,
63+ } ,
6064] as const ;
6165
6266const discordClients = new Map < string , Client > ( ) ;
@@ -273,7 +277,7 @@ async function renameDiscordThread(
273277
274278function parseLauncherCommand ( text : string ) : "setting" | null {
275279 const trimmed = text . trim ( ) . toLowerCase ( ) ;
276- if ( / ^ \/ s e t t i n g \b / . test ( trimmed ) ) return "setting" ;
280+ if ( / ^ \/ ? s e t t i n g s ? \b / . test ( trimmed ) ) return "setting" ;
277281 return null ;
278282}
279283
@@ -319,6 +323,19 @@ function buildLauncherReplyPayload(params: {
319323 } ;
320324}
321325
326+ async function sendLauncherReplyForMessage ( params : {
327+ message : any ;
328+ command : LauncherCommand ;
329+ channelId : string ;
330+ } ) : Promise < void > {
331+ const payload = buildLauncherReplyPayload ( {
332+ command : params . command ,
333+ userId : params . message . author . id ,
334+ channelId : params . channelId ,
335+ } ) ;
336+ await params . message . reply ( payload ) ;
337+ }
338+
322339function getModalValue ( interaction : any , fieldId : string ) : string {
323340 return interaction . fields . getTextInputValue ( fieldId ) || "" ;
324341}
@@ -913,7 +930,12 @@ export async function startDiscordRuntime(reason: string): Promise<boolean> {
913930 const text = message . content . trim ( ) ;
914931 const launcherCommand = parseLauncherCommand ( text ) ;
915932 if ( launcherCommand ) {
916- log . debug ( "Ignoring Discord message command in thread; slash command handles it" , {
933+ await sendLauncherReplyForMessage ( {
934+ message,
935+ command : launcherCommand ,
936+ channelId : parentId ,
937+ } ) ;
938+ log . debug ( "Handled Discord message settings command in thread" , {
917939 command : launcherCommand ,
918940 threadId,
919941 } ) ;
@@ -948,7 +970,12 @@ export async function startDiscordRuntime(reason: string): Promise<boolean> {
948970
949971 const parentLauncherCommand = parseLauncherCommand ( message . content ) ;
950972 if ( parentLauncherCommand ) {
951- log . debug ( "Ignoring Discord message command in parent channel; slash command handles it" , {
973+ await sendLauncherReplyForMessage ( {
974+ message,
975+ command : parentLauncherCommand ,
976+ channelId : parentId ,
977+ } ) ;
978+ log . debug ( "Handled Discord message settings command in parent channel" , {
952979 command : parentLauncherCommand ,
953980 channelId : parentId ,
954981 } ) ;
@@ -961,7 +988,12 @@ export async function startDiscordRuntime(reason: string): Promise<boolean> {
961988 const cleaned = cleanBotMention ( message . content , client . user . id ) ;
962989 const cleanedLauncherCommand = parseLauncherCommand ( cleaned ) ;
963990 if ( cleanedLauncherCommand ) {
964- log . debug ( "Ignoring Discord mention command; slash command handles it" , {
991+ await sendLauncherReplyForMessage ( {
992+ message,
993+ command : cleanedLauncherCommand ,
994+ channelId : parentId ,
995+ } ) ;
996+ log . debug ( "Handled Discord mention settings command" , {
965997 command : cleanedLauncherCommand ,
966998 channelId : parentId ,
967999 } ) ;
@@ -1011,10 +1043,10 @@ export async function startDiscordRuntime(reason: string): Promise<boolean> {
10111043
10121044 if ( ! interaction . isChatInputCommand || ! interaction . isChatInputCommand ( ) ) return ;
10131045 const commandName = String ( interaction . commandName || "" ) . toLowerCase ( ) ;
1014- if ( commandName !== "setting" ) return ;
1046+ if ( commandName !== "setting" && commandName !== "settings" ) return ;
10151047
10161048 const payload = buildLauncherReplyPayload ( {
1017- command : commandName as LauncherCommand ,
1049+ command : "setting" ,
10181050 userId : interaction . user . id ,
10191051 channelId : getResolvedChannelId ( interaction ) ,
10201052 } ) ;
0 commit comments