@@ -124,9 +124,9 @@ class ProfileCommand extends Command {
124124 throw new Error ( "[/profile me] profilePage is undefined" ) ;
125125 }
126126
127- const embeds = characterDataDto . isCachedDueToUnavailability
128- ? [ DiscordEmbedService . getErrorEmbed ( " Lodestone is currently unavailable. Showing cached data." ) ]
129- : [ ] ;
127+ const cachedHint = characterDataDto . isCachedDueToUnavailability
128+ ? "\n⚠️ * Lodestone is currently unavailable. Showing cached data.*"
129+ : "" ;
130130
131131 if ( profilePage === "portrait" ) {
132132 const response = await fetch ( character . portrait ) ;
@@ -136,9 +136,9 @@ class ProfileCommand extends Command {
136136 const components = ProfileGeneratorService . getComponents ( profilePage , subProfilePage , "profile" , characterId ) ;
137137
138138 await interaction . editReply ( {
139- content : `${ character . name } 🌸${ character . server . world } ` ,
139+ content : `${ character . name } 🌸${ character . server . world } ${ cachedHint } ` ,
140140 files : [ file ] ,
141- embeds,
141+ embeds : [ ] ,
142142 attachments : [ ] ,
143143 components : components ,
144144 } ) ;
@@ -152,9 +152,9 @@ class ProfileCommand extends Command {
152152 const components = ProfileGeneratorService . getComponents ( profilePage , subProfilePage , "profile" , characterId ) ;
153153
154154 await interaction . editReply ( {
155- content : `Latest Update: <t:${ characterDataDto . latestUpdate . unix ( ) } :R>` ,
155+ content : `Latest Update: <t:${ characterDataDto . latestUpdate . unix ( ) } :R>${ cachedHint } ` ,
156156 files : [ file ] ,
157- embeds,
157+ embeds : [ ] ,
158158 attachments : [ ] ,
159159 components : components ,
160160 } ) ;
@@ -178,7 +178,8 @@ class ProfileCommand extends Command {
178178 characterIds = await NaagostoneApiService . fetchCharacterIdsByName ( name , server ) ;
179179 } catch ( error : unknown ) {
180180 if ( error instanceof LodestoneServiceUnavailableError ) {
181- await DiscordMessageService . deleteAndFollowUpEphemeralError ( interaction , error . message ) ;
181+ const embed = DiscordEmbedService . getErrorEmbed ( error . message ) ;
182+ await interaction . editReply ( { embeds : [ embed ] } ) ;
182183 return ;
183184 }
184185 throw error ;
@@ -207,7 +208,8 @@ class ProfileCommand extends Command {
207208 characterDataDto = await FetchCharacterService . fetchCharacterCached ( interaction , characterId ) ;
208209 } catch ( error : unknown ) {
209210 if ( error instanceof LodestoneServiceUnavailableError ) {
210- await DiscordMessageService . deleteAndFollowUpEphemeralError ( interaction , error . message ) ;
211+ const embed = DiscordEmbedService . getErrorEmbed ( error . message ) ;
212+ await interaction . editReply ( { embeds : [ embed ] } ) ;
211213 return ;
212214 }
213215 throw error ;
@@ -231,14 +233,14 @@ class ProfileCommand extends Command {
231233 const file = new AttachmentBuilder ( profileImage ) ;
232234 const components = ProfileGeneratorService . getComponents ( "profile" , null , "profile" , characterId ) ;
233235
234- const embeds = characterDataDto . isCachedDueToUnavailability
235- ? [ DiscordEmbedService . getErrorEmbed ( " Lodestone is currently unavailable. Showing cached data." ) ]
236- : [ ] ;
236+ const cachedHint = characterDataDto . isCachedDueToUnavailability
237+ ? "\n⚠️ * Lodestone is currently unavailable. Showing cached data.*"
238+ : "" ;
237239
238240 await interaction . editReply ( {
239- content : `Latest Update: <t:${ characterDataDto . latestUpdate . unix ( ) } :R>` ,
241+ content : `Latest Update: <t:${ characterDataDto . latestUpdate . unix ( ) } :R>${ cachedHint } ` ,
240242 files : [ file ] ,
241- embeds,
243+ embeds : [ ] ,
242244 attachments : [ ] ,
243245 components : components ,
244246 } ) ;
0 commit comments