python-discord / metricity

Advanced metric collection for the Python Discord server
MIT License
42 stars 17 forks source link

Ensure thread archive state is also synced when syncing channels #156

Closed ChrisLovering closed 2 weeks ago

ChrisLovering commented 2 weeks ago

Closes #153

ChrisLovering commented 2 weeks ago

Thanks! I assume the bug was the lacking support for forum channels in older versions then?

Nah, the bug was that sync_thread_archive_state wasn't called when syncing channels, it was only called on startup.

The other part of this change isn't relevant to this issue, but added confusion to the function due to not being relevant anymore, as d.py supports forum channels now.

wookie184 commented 2 weeks ago

(and sync_thread_archive_state is needed because the db_thread.archived = thread.archived line was not sufficient as archived threads are not in guild.threads)

jchristgit commented 2 weeks ago

That explains it, thank you.