modmail-dev / Modmail

A Discord bot that functions as a shared inbox between staff and members, similar to Reddit's Modmail.
https://docs.modmail.dev
GNU Affero General Public License v3.0
1.58k stars 4.59k forks source link

[BUG] Fallback Channel Method Bugs #3002

Closed Coolguy3289 closed 3 years ago

Coolguy3289 commented 3 years ago

Describe the bug Categories usually have a max channel limit of 50, this is checked in thread.py however there is a bug in the Discord API where a category having 49 channels is returning "Category has reached the maximum number of channels" causing the thread creation to fail since the check to trigger the fallback category functionality is contingent on the category having 50 channels.

Bot Info Bot version (check with @modmail about): 3.9.3 Host method (Heroku, self-host, etc): Self-Host

Error Logs http://haste.thegamingcorner.net/imelisejom.sql After some extra Debug Logging http://haste.thegamingcorner.net/igelukovez.sql

Coolguy3289 commented 3 years ago

After making the change, I'm now seeing this issue: image The bot is creating categories with only one channel, and not filling them

Jerrie-Aries commented 3 years ago

That's kinda weird. It's like the bot didn't save the new 'fallback_category_id' or something.

Coolguy3289 commented 3 years ago

Well it did, and it used that category, but once it was filled up, it didn't migrate/update the config for the new one. Rather, it did, created the new thread and seems to have just dumped it for the old value. I've tried removing the config value and it's doing the same thing.