From c2da663fc343f3fb2bbcf1cb0700b9538bf228f3 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 21 Dec 2021 19:33:32 +0000 Subject: Correctly use string IDs for threads --- metricity/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metricity/bot.py b/metricity/bot.py index 38e12a6..42924b1 100644 --- a/metricity/bot.py +++ b/metricity/bot.py @@ -118,7 +118,7 @@ async def sync_channels(guild: Guild) -> None: active_thread_ids = [] for thread in guild.threads: - active_thread_ids.append(thread.id) + active_thread_ids.append(str(thread.id)) if thread.parent and thread.parent.category: if thread.parent.category.id in BotConfig.ignore_categories: continue @@ -136,7 +136,7 @@ async def sync_channels(guild: Guild) -> None: async with db.transaction(): async for db_thread in Thread.query.gino.iterate(): - await db_thread.update(archived=db_thread.id in active_thread_ids).apply() + await db_thread.update(archived=db_thread.id not in active_thread_ids).apply() channel_sync_in_progress.set() -- cgit v1.2.3