From 4089abc815528d314b92812d51dcd28776d347fd Mon Sep 17 00:00:00 2001 From: Ethan Ruszanowski Date: Wed, 11 Jan 2023 18:40:50 -0500 Subject: [PATCH] Add embed to teams.rs --- src/commands/random.rs | 2 +- src/commands/team.rs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/commands/random.rs b/src/commands/random.rs index 758eca3..353b0f9 100644 --- a/src/commands/random.rs +++ b/src/commands/random.rs @@ -24,4 +24,4 @@ pub(crate) async fn mode( ) -> Result<(), Error> { ctx.say("Waiting for that sweet API access.").await?; Ok(()) -} \ No newline at end of file +} diff --git a/src/commands/team.rs b/src/commands/team.rs index cea5ba5..7cdafb7 100644 --- a/src/commands/team.rs +++ b/src/commands/team.rs @@ -12,8 +12,17 @@ pub(crate) async fn team( ) -> Result<(), Error> { let mut v = ctx.guild().unwrap().voice_states; // Get hashmap of users' voice states within the guild v.retain(|_, s| s.channel_id == Some(channel.id())); // Drop users not active in requested voice channel from hashmap - let res = format!("Channel {} has {} active users. Team size is {}.", channel.id(), v.keys().len(), size); + let res = format!("Channel {} has {} active users.", channel.id(), v.keys().len()); - ctx.say(res).await?; + ctx.send(|f| f + .content(res) + .embed(|f| f + .title(format!("Custom {}v{} Teams", size, size)) + .description("I'm not done with this yet.") + .field("Order", "Some names", true) + .field("Chaos", "Other names", true) + .field("Spectators", "You guessed it, names.", false) + .color(serenity::Colour(16711680)) // Red + )).await?; Ok(()) }