Deps update

This commit is contained in:
2026-02-19 09:42:33 +00:00
parent d8c1748244
commit 1dd56f95e1
4 changed files with 1340 additions and 739 deletions

1985
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,8 +10,8 @@ color-eyre = "0.6.3"
eyre = "0.6.12"
futures = "0.3.31"
poise = "0.6.1"
rand = "0.8.5"
rusqlite = { version = "0.32.1", features = ["rusqlite-macros"] }
rand = "0.10.0"
rusqlite = { version = "0.38.0", features = ["rusqlite-macros"] }
serenity = "0.12.2"
tokio = { version = "1.41.0", features = ["rt", "net"] }
tracing = "0.1.41"

78
flake.lock generated
View File

@@ -1,15 +1,12 @@
{
"nodes": {
"crane": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1714864355,
"narHash": "sha256-uXNW6bapWFfkYIkK1EagydSrFMqycOYEDSq75GmUpjk=",
"lastModified": 1771438068,
"narHash": "sha256-nGBbXvEZVe/egCPVPFcu89RFtd8Rf6J+4RFoVCFec0A=",
"owner": "ipetkov",
"repo": "crane",
"rev": "442a7a6152f49b907e73206dc8e1f46a61e8e873",
"rev": "b5090e53e9d68c523a4bb9ad42b4737ee6747597",
"type": "github"
},
"original": {
@@ -26,11 +23,11 @@
]
},
"locked": {
"lastModified": 1715269385,
"narHash": "sha256-97UnOLbYWqBP2RY6GtMf49SoVrYiYd3EEm6phWBjKv8=",
"lastModified": 1771493599,
"narHash": "sha256-kwfV7N65lx07pSTnLtK5PqxkrqauhYHswePAgHd2J1M=",
"owner": "bluepython508",
"repo": "crane-flake-parts",
"rev": "abd7ab48488e81617740eeb4eeefc3be2e4a6b7f",
"rev": "260ca5837e562c25b0a1ba0504fcfe953dc5b680",
"type": "github"
},
"original": {
@@ -44,11 +41,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
@@ -59,39 +56,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1714656196,
"narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=",
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "94035b482d181af0a0f8f77823a790b256b7c3cc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1730504152,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1730200266,
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github"
},
"original": {
@@ -101,11 +70,26 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"crane-flake-parts": "crane-flake-parts",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
@@ -116,11 +100,11 @@
]
},
"locked": {
"lastModified": 1730514457,
"narHash": "sha256-cjFX208s9pyaOfMvF9xI6WyafyXINqdhMF7b1bMQpLI=",
"lastModified": 1771470520,
"narHash": "sha256-PvytHcaYN5cPUll7FB70mXv1rRsIBRmu47fFfq3haxA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "1ff38ca26eb31858e4dfe7fe738b6b3ce5d74922",
"rev": "a1d4cc1f264c45d3745af0d2ca5e59d460e58777",
"type": "github"
},
"original": {

View File

@@ -1,4 +1,4 @@
use std::{io, path::Path, time::Duration};
use std::{io, mem, path::Path, time::Duration};
use ::serenity::all::{ChannelId, EditMessage, GuildId, Mentionable, UserId};
use eyre::{Context as _, Error, OptionExt, Result};
@@ -143,11 +143,13 @@ async fn spread(
.ok_or_eyre("This bot only works in servers")?;
let mut to = channel_children(&ctx, to).await?;
let mut users = from.members(ctx)?;
users.shuffle(&mut rand::thread_rng());
to.retain(|x| x.members(ctx).is_ok_and(|x| x.is_empty()));
to.shuffle(&mut rand::thread_rng());
{
let mut rng = rand::rng();
users.shuffle(&mut rng);
to.retain(|x| x.members(ctx).is_ok_and(|x| x.is_empty()));
to.shuffle(&mut rng);
}
move_users(
ctx,
guild,