fix (sessions): Recognise accountability sessions.

This commit is contained in:
2021-12-08 11:44:35 +02:00
parent 9d0fd93822
commit f18af33fb6

View File

@@ -78,7 +78,7 @@ class Session:
# TODO: More reliable channel type determination
if state.channel.id in tables.rented.row_cache:
channel_type = SessionChannelType.RENTED
elif state.channel.id in tables.accountability_rooms.row_cache:
elif state.channel.category and state.channel.category.id == lion.guild_settings.accountability_category.data:
channel_type = SessionChannelType.ACCOUNTABILITY
else:
channel_type = SessionChannelType.STANDARD