Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions techsupport_bot/commands/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ async def create_thread(
name=f"[OPEN] | {user} | {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} | {user.id}",
embed=embed,
content=role_string.rstrip()[:2000],
allowed_mentions=discord.AllowedMentions(roles=True),
)
active_threads[user.id] = thread[0].id

Expand Down Expand Up @@ -911,13 +912,9 @@ async def handle_reboot(self):

await Modmail_client.close()

@commands.Cog.listener()
async def on_ready(self):
"""Fetches the modmail channel only once ready
Not done in preconfig because that breaks stuff for some reason"""
await self.bot.wait_until_ready()
# Has to be done in here, putting into preconfig breaks stuff for some reason
self.modmail_forum = self.bot.get_channel(MODMAIL_FORUM_ID)
async def preconfig(self):
"""Fetches modmail threads once ready"""
self.modmail_forum = await self.bot.fetch_channel(MODMAIL_FORUM_ID)

# Populates the currently active threads
for thread in self.modmail_forum.threads:
Expand Down