Shuffle channels in addition to users

This commit is contained in:
bluepython508
2024-11-03 22:22:28 +00:00
parent 735fafd4fb
commit 087324b785

View File

@@ -7,7 +7,6 @@ use rand::seq::SliceRandom;
use rusqlite::OptionalExtension;
// TODO: buttons?
// TODO: shuffle channels as well as users/instead of users?
#[derive(Copy, Clone)]
struct GuildData {
@@ -95,7 +94,8 @@ async fn run(ctx: Context<'_>, from: serenity::ChannelId, to: serenity::ChannelI
.collect::<Vec<_>>();
users.shuffle(&mut rand::thread_rng());
let to = channels_for(to)?;
let mut to = channels_for(to)?;
to.shuffle(&mut rand::thread_rng());
futures::future::try_join_all(
to.into_iter()