pub fn training_embed_add_tier(
    e: &mut CreateEmbed,
    t: &Option<(db::Tier, Vec<db::TierMapping>)>,
    inline: bool,
) {
    match t {
        None => {
            e.field("No Tier required", "Open for everyone", inline);
        }
        Some((tier, roles)) => {
            e.field(
                format!("Requires: {}", tier.name),
                roles
                    .iter()
                    .map(|r| Mention::from(RoleId::from(r.discord_role_id as u64)).to_string())
                    .collect::<Vec<_>>()
                    .join("\n"),
                inline,
            );
        }
    }
}
// adds the required tiers to the embed field. Should only be used in
// guild channels since pinging wont work in DM's
adds the required tiers to the embed field. Should only be used in
guild channels since pinging wont work in DM's
adds the required tiers to the embed field . Should only be used in guild channels since pinging wont work in DM ' s
pub fn training_embed_add_tier(
    e: &mut CreateEmbed,
    t: &Option<(db::Tier, Vec<db::TierMapping>)>,
    inline: bool,
) {
    match t {
        None => {
            e.field("No Tier required", "Open for everyone", inline);
        }
        Some((tier, roles)) => {
            e.field(
                format!("Requires: {}", tier.name),
                roles
                    .iter()
                    .map(|r| Mention::from(RoleId::from(r.discord_role_id as u64)).to_string())
                    .collect::<Vec<_>>()
                    .join("\n"),
                inline,
            );
        }
    }
}
pub fn training_embed_add_tier ( e : & mut CreateEmbed , t : & Option < ( db :: Tier , Vec < db :: TierMapping > ) > , inline : bool , ) { match t { None => { e . field ( " " , " " , inline ) ; } Some ( ( tier , roles ) ) => { e . field ( format ! ( " " tier name ) , roles . iter ( ) . map ( | r | Mention :: from ( RoleId :: from ( r . discord_role_id as u64 ) ) . to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( " \n " ) , inline , ) ; } } }
adds the required tiers to the embed field.
adds the required tiers to the embed field .
e
&mut CreateEmbed
t
&Option<(db::Tier, Vec<db::TierMapping>)>
inline
bool