fn welcome_message(args: Args) -> Result {
    const WELCOME_BILLBOARD: &'static str = "By participating in this community, you agree to follow the Rust Code of Conduct, as linked below. Please click the :white_check_mark: below to acknowledge and gain access to the channels.

  https://www.rust-lang.org/policies/code-of-conduct  ";

    if api::is_mod(&args)? {
        let channel_name = &args
            .params
            .get("channel")
            .ok_or("unable to retrieve channel param")?;

        let channel_id = ChannelId::from_str(channel_name)?;
        let message = channel_id.say(&args.cx, WELCOME_BILLBOARD)?;
        let bot_id = &message.author.id;
        cache::save_or_update_user("me", bot_id)?;
        cache::save_or_update_message("welcome", message.id, channel_id)?;
        let white_check_mark = ReactionType::from("✅");
        message.react(&args.cx, white_check_mark)?;
    }
    Ok(())
}
/// Write the welcome message to the welcome channel.  
Write the welcome message to the welcome channel.
Write the welcome message to the welcome channel .
fn welcome_message(args: Args) -> Result {
    const WELCOME_BILLBOARD: &'static str = "By participating in this community, you agree to follow the Rust Code of Conduct, as linked below. Please click the :white_check_mark: below to acknowledge and gain access to the channels.
  https://www.rust-lang.org/policies/code-of-conduct  ";
    if api::is_mod(&args)? {
        let channel_name = &args
            .params
            .get("channel")
            .ok_or("unable to retrieve channel param")?;
        let channel_id = ChannelId::from_str(channel_name)?;
        let message = channel_id.say(&args.cx, WELCOME_BILLBOARD)?;
        let bot_id = &message.author.id;
        cache::save_or_update_user("me", bot_id)?;
        cache::save_or_update_message("welcome", message.id, channel_id)?;
        let white_check_mark = ReactionType::from("✅");
        message.react(&args.cx, white_check_mark)?;
    }
    Ok(())
}
fn welcome_message ( args : Args ) -> Result { const WELCOME_BILLBOARD : & ' static str = " " ; if api :: is_mod ( & args ) ? { let channel_name = & args . params . get ( " " ) . ok_or ( " " ) ? ; let channel_id = ChannelId :: from_str ( channel_name ) ? ; let message = channel_id . say ( & args . cx , WELCOME_BILLBOARD ) ? ; let bot_id = & message . author . id ; cache :: save_or_update_user ( " " , bot_id ) ? ; cache :: save_or_update_message ( " " , message . id , channel_id ) ? ; let white_check_mark = ReactionType :: from ( " ; message . react ( & args . cx , white_check_mark ) ? ; } Ok ( ( ) ) }
Write the welcome message to the welcome channel.
Write the welcome message to the welcome channel .
args
Args
args
Args