@@ -9,8 +9,8 @@ use crate::i18n::get_translated_message;
99use crate :: utils:: command:: defer_response:: defer_response;
1010use crate :: utils:: message:: message_builder:: MessageBuilder ;
1111use serenity:: all:: {
12- CommandDataOptionValue , CommandInteraction , CommandOptionType , Context , CreateCommand ,
13- CreateCommandOption , CreateInteractionResponseFollowup , ResolvedOption ,
12+ CommandDataOptionValue , CommandInteraction , CommandOptionType , CommandType , Context ,
13+ CreateCommand , CreateCommandOption , CreateInteractionResponseFollowup , ResolvedOption ,
1414} ;
1515use std:: collections:: HashMap ;
1616
@@ -53,6 +53,7 @@ impl RegistrableCommand for RemoveStaffCommand {
5353 CreateCommandOption :: new( CommandOptionType :: User , "user_id" , user_id_desc)
5454 . required( true ) ,
5555 ) ,
56+ CreateCommand :: new( "remove_staff" ) . kind( CommandType :: User ) ,
5657 ]
5758 } )
5859 }
@@ -90,7 +91,15 @@ impl RegistrableCommand for RemoveStaffCommand {
9091 ) ) ) ;
9192 }
9293 } ,
93- None => return Err ( ModmailError :: Command ( CommandError :: MissingArguments ) ) ,
94+ None => {
95+ if let Some ( user_id) = command. data . target_id {
96+ user_id. to_user_id ( )
97+ } else {
98+ return Err ( ModmailError :: Command ( CommandError :: InvalidArguments (
99+ "user_id" . to_string ( ) ,
100+ ) ) ) ;
101+ }
102+ }
94103 } ;
95104
96105 if thread_exists ( command. user . id , pool) . await {
0 commit comments