Shuffle channels in addition to users
This commit is contained in:
@@ -7,7 +7,6 @@ use rand::seq::SliceRandom;
|
|||||||
use rusqlite::OptionalExtension;
|
use rusqlite::OptionalExtension;
|
||||||
|
|
||||||
// TODO: buttons?
|
// TODO: buttons?
|
||||||
// TODO: shuffle channels as well as users/instead of users?
|
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
struct GuildData {
|
struct GuildData {
|
||||||
@@ -95,7 +94,8 @@ async fn run(ctx: Context<'_>, from: serenity::ChannelId, to: serenity::ChannelI
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
users.shuffle(&mut rand::thread_rng());
|
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(
|
futures::future::try_join_all(
|
||||||
to.into_iter()
|
to.into_iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user