Skip to content

Commit 2843fdb

Browse files
committed
Add a optional category argument in ThreadManager.create
1 parent af4bc7a commit 2843fdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/thread.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ async def _find_from_channel(self, channel):
395395

396396
return thread
397397

398-
async def create(self, recipient, *, creator=None):
398+
async def create(self, recipient, *, creator=None, category=None):
399399
"""Creates a modmail thread"""
400400

401401
em = discord.Embed(
@@ -414,7 +414,7 @@ async def create(self, recipient, *, creator=None):
414414

415415
channel = await self.bot.modmail_guild.create_text_channel(
416416
name=self._format_channel_name(recipient),
417-
category=self.bot.main_category
417+
category=category or self.bot.main_category
418418
)
419419

420420
thread.channel = channel

0 commit comments

Comments
 (0)