Skip to content

Commit e799811

Browse files
committed
Set thread to ready by default
1 parent 273e795 commit e799811

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/modmail.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ async def send(self, message, destination=None, from_mod=False, delete_message=T
100100
em.set_author(name=str(author), icon_url=author.avatar_url)
101101
em.set_footer(text=f'User - {message.id}')
102102

103-
await self.wait_until_ready()
103+
if not self.ready:
104+
await self.wait_until_ready()
105+
104106
await destination.trigger_typing()
105107
await destination.send(embed=em)
106108

@@ -174,6 +176,7 @@ async def _find_from_channel(self, channel):
174176
recipient = self.bot.get_user(user_id) # this could be None
175177

176178
self.cache[user_id] = thread = Thread(self, recipient)
179+
thread.ready = True
177180
thread.channel = channel
178181
thread.id = user_id
179182

0 commit comments

Comments
 (0)