fn precision_math(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult {
    let args_full = args.rest();

    let value = if args_full.contains("for") {
        String::from("Illegal Character ``for``")
    } else if args_full.contains("print") {
        String::from("Illegal Character ``print``")
    } else if args_full.contains("warrenty") {
        String::from("Illegal Character ``warrenty``")
    } else if args_full.contains("while") {
        String::from("Illegal Character ``while``")
    } else {
        match bc::bc_timeout!(args_full) {
            Ok(value) => {
                if value.len() < 2000 {
                    value
                } else {
                    String::from("Output too large to send")
                }
            }
            Err(err) => format!("```{:?}```", err),
        }
    };

    let content = content_safe(&ctx, value, &ContentSafeOptions::default());

    msg.channel_id
        .say(&ctx.http, content)
        .map_or_else(|e| Err(CommandError(e.to_string())), |_| Ok(()))
}
/// For when math isn't precise enough for you. (15 second timeout on calculations)
For when math isn't precise enough for you. (15 second timeout on calculations)
For when math isn ' t precise enough for you . ( 15 second timeout on calculations )
fn precision_math(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult {
    let args_full = args.rest();
    let value = if args_full.contains("for") {
        String::from("Illegal Character ``for``")
    } else if args_full.contains("print") {
        String::from("Illegal Character ``print``")
    } else if args_full.contains("warrenty") {
        String::from("Illegal Character ``warrenty``")
    } else if args_full.contains("while") {
        String::from("Illegal Character ``while``")
    } else {
        match bc::bc_timeout!(args_full) {
            Ok(value) => {
                if value.len() < 2000 {
                    value
                } else {
                    String::from("Output too large to send")
                }
            }
            Err(err) => format!("```{:?}```", err),
        }
    };
    let content = content_safe(&ctx, value, &ContentSafeOptions::default());
    msg.channel_id
        .say(&ctx.http, content)
        .map_or_else(|e| Err(CommandError(e.to_string())), |_| Ok(()))
}
fn precision_math ( ctx : & mut Context , msg : & Message , args : Args ) -> CommandResult { let args_full = args . rest ( ) ; let value = if args_full . contains ( " " ) { String :: from ( " " ) } else if args_full . contains ( " " ) { String :: from ( " " ) } else if args_full . contains ( " " ) { String :: from ( " " ) } else if args_full . contains ( " " ) { String :: from ( " " ) } else { match bc :: bc_timeout ! ( args_full ) { Ok ( value ) => { if value . len ( ) < 2000 { value } else { String :: from ( " " ) } } Err ( err ) => format ! ( " " err ) , } } ; let content = content_safe ( & ctx , value , & ContentSafeOptions :: default ( ) ) ; msg . channel_id . say ( & ctx . http , content ) . map_or_else ( | e | Err ( CommandError ( e . to_string ( ) ) ) , | _ | Ok ( ( ) ) ) }
For when math isn't precise enough for you.
For when math isn ' t precise enough for you .
ctx
&mut Context
msg
&Message
args
Args
ctx
&mut Context
msg
&Message
args
Args