fn slow_mode(args: Args) -> Result {
    if api::is_mod(&args)? {
        let seconds = &args
            .params
            .get("seconds")
            .ok_or("unable to retrieve seconds param")?
            .parse::<u64>()?;

        let channel_name = &args
            .params
            .get("channel")
            .ok_or("unable to retrieve channel param")?;

        ChannelId::from_str(channel_name)?.edit(&args.cx, |c| c.slow_mode_rate(*seconds))?;
    }
    Ok(())
}
/// Set slow mode for a channel.  
///
/// A `seconds` value of 0 will disable slowmode
Set slow mode for a channel.
A `seconds` value of 0 will disable slowmode
Set slow mode for a channel . A ` seconds ` value of 0 will disable slowmode
fn slow_mode(args: Args) -> Result {
    if api::is_mod(&args)? {
        let seconds = &args
            .params
            .get("seconds")
            .ok_or("unable to retrieve seconds param")?
            .parse::<u64>()?;
        let channel_name = &args
            .params
            .get("channel")
            .ok_or("unable to retrieve channel param")?;
        ChannelId::from_str(channel_name)?.edit(&args.cx, |c| c.slow_mode_rate(*seconds))?;
    }
    Ok(())
}
fn slow_mode ( args : Args ) -> Result { if api :: is_mod ( & args ) ? { let seconds = & args . params . get ( " " ) . ok_or ( " " ) ? . parse :: < u64 > ( ) ? ; let channel_name = & args . params . get ( " " ) . ok_or ( " " ) ? ; ChannelId :: from_str ( channel_name ) ? . edit ( & args . cx , | c | c . slow_mode_rate ( * seconds ) ) ? ; } Ok ( ( ) ) }
Set slow mode for a channel.
Set slow mode for a channel .
args
Args
args
Args