Skip locking 2 threads

This commit is contained in:
bluepython508
2026-02-27 20:49:37 +00:00
parent 624b154580
commit 872adae8f3

View File

@@ -40,11 +40,12 @@ async fn create_dailies(data: &Data) -> Result<()> {
tracing::info!(?data);
for (guild, cfg) in data.iter() {
async move {
let channels = guild.get_active_threads(&ctx).await?;
let mut channels = guild.get_active_threads(&ctx).await?;
tracing::info!(?guild, ?cfg, ?channels, "Creating dailies for guild");
for prev in channels.threads.into_iter().filter(|chan| {
channels.threads.sort_by_key(|chan| chan.id.created_at());
for prev in channels.threads.into_iter().rev().filter(|chan| {
chan.parent_id == Some(cfg.topics) && chan.applied_tags.contains(&cfg.tag)
}) {
}).skip(2) {
async move {
tracing::info!(?prev.id, "Thread with tag");
prev.id