@@ -156,7 +156,7 @@ impl RegistrableCommand for CloseCommand {
156156 . await
157157 . unwrap_or ( false ) ;
158158 return if existed {
159- let response = MessageBuilder :: system_message ( & ctx, & config)
159+ let _ = MessageBuilder :: system_message ( & ctx, & config)
160160 . translated_content (
161161 "close.closure_canceled" ,
162162 None ,
@@ -165,10 +165,8 @@ impl RegistrableCommand for CloseCommand {
165165 )
166166 . await
167167 . to_channel ( command. channel_id )
168- . build_interaction_message_followup ( )
168+ . send_interaction_followup ( & command , true )
169169 . await ;
170-
171- let _ = command. create_followup ( & ctx. http , response) . await ;
172170 Ok ( ( ) )
173171 } else {
174172 Err ( ModmailError :: Command (
@@ -199,7 +197,7 @@ impl RegistrableCommand for CloseCommand {
199197 let mut warn_params = HashMap :: new ( ) ;
200198 warn_params. insert ( "old_time" . to_string ( ) , old_human) ;
201199
202- let response = MessageBuilder :: system_message ( & ctx, & config)
200+ let _ = MessageBuilder :: system_message ( & ctx, & config)
203201 . translated_content (
204202 "close.replacing_existing_closure" ,
205203 Some ( & warn_params) ,
@@ -208,10 +206,8 @@ impl RegistrableCommand for CloseCommand {
208206 )
209207 . await
210208 . to_channel ( command. channel_id )
211- . build_interaction_message_followup ( )
209+ . send_interaction_followup ( & command , true )
212210 . await ;
213-
214- let _ = command. create_followup ( & ctx. http , response) . await ;
215211 }
216212 }
217213
@@ -220,36 +216,24 @@ impl RegistrableCommand for CloseCommand {
220216 let mut params = HashMap :: new ( ) ;
221217 params. insert ( "time" . to_string ( ) , human) ;
222218
223- let _ = if silent {
224- let response = MessageBuilder :: system_message ( & ctx, & config)
225- . translated_content (
226- "close.silent_closing" ,
227- Some ( & params) ,
228- Some ( command. user . id ) ,
229- command. guild_id . map ( |g| g. get ( ) ) ,
230- )
231- . await
232- . to_channel ( command. channel_id )
233- . build_interaction_message_followup ( )
234- . await ;
235-
236- command. create_followup ( & ctx. http , response) . await
219+ let close_key = if silent {
220+ "close.silent_closing"
237221 } else {
238- let response = MessageBuilder :: system_message ( & ctx, & config)
239- . translated_content (
240- "close.closing" ,
241- Some ( & params) ,
242- Some ( command. user . id ) ,
243- command. guild_id . map ( |g| g. get ( ) ) ,
244- )
245- . await
246- . to_channel ( command. channel_id )
247- . build_interaction_message_followup ( )
248- . await ;
249-
250- command. create_followup ( & ctx. http , response) . await
222+ "close.closing"
251223 } ;
252224
225+ let _ = MessageBuilder :: system_message ( & ctx, & config)
226+ . translated_content (
227+ close_key,
228+ Some ( & params) ,
229+ Some ( command. user . id ) ,
230+ command. guild_id . map ( |g| g. get ( ) ) ,
231+ )
232+ . await
233+ . to_channel ( command. channel_id )
234+ . send_interaction_followup ( & command, true )
235+ . await ;
236+
253237 let closed_by = command. user . id . to_string ( ) ;
254238
255239 let ( category_id, category_name, required_permissions) =
@@ -336,7 +320,7 @@ impl RegistrableCommand for CloseCommand {
336320 let mut params = HashMap :: new ( ) ;
337321 params. insert ( "username" . to_string ( ) , thread. user_name . clone ( ) ) ;
338322
339- let response = MessageBuilder :: system_message ( & ctx, & config)
323+ let _ = MessageBuilder :: system_message ( & ctx, & config)
340324 . translated_content (
341325 "user.left_server_close" ,
342326 Some ( & params) ,
@@ -345,10 +329,8 @@ impl RegistrableCommand for CloseCommand {
345329 )
346330 . await
347331 . to_channel ( command. channel_id )
348- . build_interaction_message_followup ( )
332+ . send_interaction_followup ( & command , true )
349333 . await ;
350-
351- let _ = command. create_followup ( & ctx. http , response) . await ;
352334 }
353335
354336 close_thread (
0 commit comments