this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat!: no more raffle

isabel f6166143 df242b65

-36
-35
src/commands/fun/chance.rs
··· 14 14 ctx.say(format!("You rolled a **{roll}**")).await?; 15 15 Ok(()) 16 16 } 17 - 18 - /// Select a random person to win a raffle 19 - #[poise::command(slash_command)] 20 - pub async fn raffle(ctx: Context<'_>) -> Result<()> { 21 - let mut memeberid: UserId = UserId::new(1); 22 - 23 - let members = ctx 24 - .guild_id() 25 - .unwrap() 26 - .members(&ctx.http(), None, None) 27 - .await?; 28 - 29 - let mut find_member = false; 30 - while !find_member { 31 - let selected = rand::rng().random_range(1..=members.len()); 32 - let memeber = &members[selected].user; 33 - memeberid = memeber.id; 34 - 35 - if let Some(presence) = ctx.guild().unwrap().presences.get(&memeberid) { 36 - find_member = presence.status == OnlineStatus::Online 37 - || presence.status == OnlineStatus::Idle 38 - && !memeber.bot 39 - && memeberid != ctx.author().id; 40 - } 41 - } 42 - 43 - if Some(memeberid).is_some() && memeberid != UserId::new(1) { 44 - let builder = poise::CreateReply::default() 45 - .content(format!("<@{memeberid}> has won the raffle")) 46 - .allowed_mentions(poise::serenity_prelude::CreateAllowedMentions::new()); 47 - ctx.send(builder).await?; 48 - } 49 - 50 - Ok(()) 51 - }
-1
src/main.rs
··· 47 47 commands::nix::nixpkg::nixpkg(), 48 48 // fun commands 49 49 commands::fun::chance::roll(), 50 - commands::fun::chance::raffle(), 51 50 commands::fun::kittysay::kittysay(), 52 51 commands::fun::bottom::topify(), 53 52 commands::fun::bottom::bottomify(),