aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2021-12-21 19:33:32 +0000
committerGravatar Chris Lovering <[email protected]>2021-12-21 19:33:32 +0000
commitc2da663fc343f3fb2bbcf1cb0700b9538bf228f3 (patch)
treef762514b5e4c173623dd65ce619850792349952e
parentBump version number (diff)
Correctly use string IDs for threads
-rw-r--r--metricity/bot.py4
1 files 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()