@@ -39,21 +39,53 @@ impl RegistrableCommand for CloseCommand {
3939 None ,
4040 )
4141 . await ;
42+ let time_before_close_desc = get_translated_message (
43+ & config,
44+ "slash_command.close_time_before_close_argument" ,
45+ None ,
46+ None ,
47+ None ,
48+ None ,
49+ )
50+ . await ;
51+ let silent_desc = get_translated_message (
52+ & config,
53+ "slash_command.close_silent_argument" ,
54+ None ,
55+ None ,
56+ None ,
57+ None ,
58+ )
59+ . await ;
60+ let cancel_desc = get_translated_message (
61+ & config,
62+ "slash_command.close_cancel_argument" ,
63+ None ,
64+ None ,
65+ None ,
66+ None ,
67+ )
68+ . await ;
4269
4370 vec ! [
44- CreateCommand :: new( "close" ) . description( cmd_desc) . add_option(
45- CreateCommandOption :: new(
46- CommandOptionType :: String , "time_before_close" , "Duration before the thread is closed (e.g., 10m, 1h, 2d). Defaults the thread is closed immediately." )
47- . required( false )
48- ) . add_option(
49- CreateCommandOption :: new(
50- CommandOptionType :: Boolean , "silent" , "If set, the user will not be notified when the thread is closed." )
51- . required( false )
52- ) . add_option(
53- CreateCommandOption :: new(
54- CommandOptionType :: Boolean , "cancel" , "If set, cancels any scheduled closure for this thread." )
55- . required( false )
56- )
71+ CreateCommand :: new( "close" )
72+ . description( cmd_desc)
73+ . add_option(
74+ CreateCommandOption :: new(
75+ CommandOptionType :: String ,
76+ "time_before_close" ,
77+ time_before_close_desc,
78+ )
79+ . required( false ) ,
80+ )
81+ . add_option(
82+ CreateCommandOption :: new( CommandOptionType :: Boolean , "silent" , silent_desc)
83+ . required( false ) ,
84+ )
85+ . add_option(
86+ CreateCommandOption :: new( CommandOptionType :: Boolean , "cancel" , cancel_desc)
87+ . required( false ) ,
88+ ) ,
5789 ]
5890 } )
5991 }
0 commit comments