fn ban(args: Args) -> Result {
    if api::is_mod(&args)? {
        let user_id = parse_username(
            &args
                .params
                .get("user")
                .ok_or("unable to retrieve user param")?,
        )
        .ok_or("unable to retrieve user id")?;

        if let Some(guild) = args.msg.guild(&args.cx) {
            guild.read().ban(&args.cx, UserId::from(user_id), &"all")?
        }
    }
    Ok(())
}
/// Ban an user from the guild.  
///
/// Requires the ban members permission
Ban an user from the guild.
Requires the ban members permission
Ban an user from the guild . Requires the ban members permission
fn ban(args: Args) -> Result {
    if api::is_mod(&args)? {
        let user_id = parse_username(
            &args
                .params
                .get("user")
                .ok_or("unable to retrieve user param")?,
        )
        .ok_or("unable to retrieve user id")?;
        if let Some(guild) = args.msg.guild(&args.cx) {
            guild.read().ban(&args.cx, UserId::from(user_id), &"all")?
        }
    }
    Ok(())
}
fn ban ( args : Args ) -> Result { if api :: is_mod ( & args ) ? { let user_id = parse_username ( & args . params . get ( " " ) . ok_or ( " " ) ? , ) . ok_or ( " " ) ? ; if let Some ( guild ) = args . msg . guild ( & args . cx ) { guild . read ( ) . ban ( & args . cx , UserId :: from ( user_id ) , & " " ) ? } } Ok ( ( ) ) }
Ban an user from the guild.
Ban an user from the guild .
args
Args
args
Args