async fn points(&self, context: Context, msg: &Message, _args: String) {
        if let Some(g) = msg.guild(&context).await {
            let points_left = self
                .points
                .get(&g.id)
                .unwrap()
                .read()
                .await
                .get(&msg.author.id)
                .map(|a| a.load(Ordering::Relaxed))
                .unwrap_or(STARTING_POINTS);
            // Send the user the number of points they have left
            msg.author
                .dm(&context, |m| {
                    m.content(format!(
                        "You have {} points left (out of {}) to spend in this election.",
                        points_left, STARTING_POINTS,
                    ))
                })
                .await
                .expect("discord API error");
        }
    }
/// !points: Get the sender's remaining points in the election
Get the sender's remaining points in the election
Get the sender ' s remaining points in the election
async fn points(&self, context: Context, msg: &Message, _args: String) {
        if let Some(g) = msg.guild(&context).await {
            let points_left = self
                .points
                .get(&g.id)
                .unwrap()
                .read()
                .await
                .get(&msg.author.id)
                .map(|a| a.load(Ordering::Relaxed))
                .unwrap_or(STARTING_POINTS);
            // Send the user the number of points they have left
            msg.author
                .dm(&context, |m| {
                    m.content(format!(
                        "You have {} points left (out of {}) to spend in this election.",
                        points_left, STARTING_POINTS,
                    ))
                })
                .await
                .expect("discord API error");
        }
    }
async fn points ( & self , context : Context , msg : & Message , _args : String ) { if let Some ( g ) = msg . guild ( & context ) . await { let points_left = self . points . get ( & g . id ) . unwrap ( ) . read ( ) . await . get ( & msg . author . id ) . map ( | a | a . load ( Ordering :: Relaxed ) ) . unwrap_or ( STARTING_POINTS ) ; // Send the user the number of points they have left msg . author . dm ( & context , | m | { m . content ( format ! ( " " points_left STARTING_POINTS ) ) } ) . await . expect ( " " ) ; } }
points: Get the sender's remaining points in the election
points : Get the sender ' s remaining points in the election
&self
context
Context
msg
&Message
_args
String
&self
context
Context
msg
&Message
_args
String