async fn poll_votes(&self, context: Context, g: &GuildId) {
        let winners = self.winners(g).await.join("\n");

        if !self.results.read().await.contains_key(g) {
            return;
        }

        // Edit the results section in the new poll message to have the winning candidates
        let cts = self
            .results
            .read()
            .await
            .get(g)
            .unwrap()
            .content
            .split_inclusive("**Results so Far:**")
            .map(|s| s.to_owned())
            .next()
            .unwrap_or_default();

        self.results
            .write()
            .await
            .get_mut(g)
            .unwrap()
            .edit(context, |m| m.content(format!("{}\n{}", cts, winners)))
            .await
            .expect("discord API error");
    }
/// Updates the most recent poll announcement in the given guild with the latest polling
/// numbers.
Updates the most recent poll announcement in the given guild with the latest polling
numbers.
Updates the most recent poll announcement in the given guild with the latest polling numbers .
async fn poll_votes(&self, context: Context, g: &GuildId) {
        let winners = self.winners(g).await.join("\n");
        if !self.results.read().await.contains_key(g) {
            return;
        }
        // Edit the results section in the new poll message to have the winning candidates
        let cts = self
            .results
            .read()
            .await
            .get(g)
            .unwrap()
            .content
            .split_inclusive("**Results so Far:**")
            .map(|s| s.to_owned())
            .next()
            .unwrap_or_default();
        self.results
            .write()
            .await
            .get_mut(g)
            .unwrap()
            .edit(context, |m| m.content(format!("{}\n{}", cts, winners)))
            .await
            .expect("discord API error");
    }
async fn poll_votes ( & self , context : Context , g : & GuildId ) { let winners = self . winners ( g ) . await . join ( " \n " ) ; if ! self . results . read ( ) . await . contains_key ( g ) { return ; } // Edit the results section in the new poll message to have the winning candidates let cts = self . results . read ( ) . await . get ( g ) . unwrap ( ) . content . split_inclusive ( " " ) . map ( | s | s . to_owned ( ) ) . next ( ) . unwrap_or_default ( ) ; self . results . write ( ) . await . get_mut ( g ) . unwrap ( ) . edit ( context , | m | m . content ( format ! ( " \n " cts winners ) ) ) . await . expect ( " " ) ; }
Updates the most recent poll announcement in the given guild with the latest polling
numbers.
Updates the most recent poll announcement in the given guild with the latest polling numbers .
&self
context
Context
g
&GuildId
&self
context
Context
g
&GuildId