discord-csharp / MODiX

Discord Bot handling basic moderation needs, soon implements statistics.
MIT License
116 stars 63 forks source link

Track threads in the GuildChannels table #958

Closed Scott-Caldwell closed 2 years ago

Scott-Caldwell commented 2 years ago

Should fix the foreign key error we've been getting. Adds a ParentChannelId column to GuildChannels, stores a value in this column whenever we try to track a thread. Updates queries that reference messages or channels to use the ChannelId or ParentChannelId as needed (so for example, when we count user participation we count messages in forum threads toward the total message count of the forum itself).