diff --git a/src/slash_argument/slash_macro.rs b/src/slash_argument/slash_macro.rs index e4b0003a06bd..0bd5ebfd51c9 100644 --- a/src/slash_argument/slash_macro.rs +++ b/src/slash_argument/slash_macro.rs @@ -45,6 +45,14 @@ impl SlashArgError { Self::CommandStructureMismatch { description } } + pub fn new_parse(error: Box, input: String) -> Self { + Self::Parse { error, input } + } + + pub fn new_invalid(description: &'static str) -> Self { + Self::Invalid(description) + } + pub fn to_framework_error( self, ctx: crate::ApplicationContext<'_, U, E>,