smol bot
Diffstat (limited to 'src/bot/mod.rs')
| -rw-r--r-- | src/bot/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bot/mod.rs b/src/bot/mod.rs index 2b0e880..fd350c1 100644 --- a/src/bot/mod.rs +++ b/src/bot/mod.rs @@ -1198,11 +1198,12 @@ pub async fn stats_(c: Option<Context<'_>>) -> (u32, u32, u32, fimg::Image<Vec<u }) .buffer_unordered(16) .collect::<Vec<_>>() - .await - .into_iter() + .await; + x.sort_by_key(|x| x.1); + let x = x.into_iter() .map(|(a, b)| Series::new(a, vec![(b as f32 / t as f32) * 100.])) .collect::<Vec<_>>(); - x.sort_by_key(|x| x.data[0] as u64); + let mut y = users .into_iter() |