Skip to content

Commit b145cf1

Browse files
committed
Change Max Channel per Category to 49, fix fallback save logic
1 parent 3e4d9b0 commit b145cf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/thread.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1205,16 +1205,16 @@ async def create(
12051205

12061206
# Schedule thread setup for later
12071207
cat = self.bot.main_category
1208-
if category is None and len(cat.channels) == 50:
1208+
if category is None and len(cat.channels) >= 49:
12091209
fallback_id = self.bot.config["fallback_category_id"]
12101210
if fallback_id:
12111211
fallback = discord.utils.get(cat.guild.categories, id=int(fallback_id))
1212-
if fallback and len(fallback.channels) != 50:
1212+
if fallback and len(fallback.channels) < 49:
12131213
category = fallback
12141214

12151215
if not category:
12161216
category = await cat.clone(name="Fallback Modmail")
1217-
self.bot.config.set("fallback_category_id", category.id)
1217+
self.bot.config.set("fallback_category_id", str(category.id))
12181218
await self.bot.config.update()
12191219

12201220
if (message or not manual_trigger) and self.bot.config["confirm_thread_creation"]:

0 commit comments

Comments
 (0)