@@ -189,6 +189,10 @@ async def reply(self, message):
189
189
# to user
190
190
self .send (message , self .recipient , from_mod = True )
191
191
]
192
+
193
+ self .bot .loop .create_task (
194
+ self .bot .modmail_api .append_log (message , self .channel .id )
195
+ )
192
196
193
197
if self .close_task is not None :
194
198
# cancel closing if a thread message is sent.
@@ -207,17 +211,16 @@ async def send(self, message, destination=None, from_mod=False):
207
211
await self .channel .send (embed = discord .Embed (
208
212
color = discord .Color .red (),
209
213
description = 'Scheduled close has been cancelled.' ))
214
+
215
+ if not from_mod :
216
+ self .bot .loop .create_task (
217
+ self .bot .modmail_api .append_log (message , self .channel .id )
218
+ )
210
219
211
220
if not self .ready :
212
221
await self .wait_until_ready ()
213
222
214
223
destination = destination or self .channel
215
- if from_mod and not isinstance (destination , discord .User ):
216
- self .bot .loop .create_task (
217
- self .bot .modmail_api .append_log (message ))
218
- elif not from_mod :
219
- self .bot .loop .create_task (
220
- self .bot .modmail_api .append_log (message , destination .id ))
221
224
222
225
author = message .author
223
226
@@ -431,8 +434,7 @@ async def create(self, recipient, *, creator=None, category=None):
431
434
thread .channel = channel
432
435
433
436
log_url , log_data = await asyncio .gather (
434
- self .bot .modmail_api .get_log_url (recipient , channel ,
435
- creator or recipient ),
437
+ self .bot .modmail_api .get_log_url (recipient , channel , creator or recipient ),
436
438
self .bot .modmail_api .get_user_logs (recipient .id )
437
439
# self.get_dominant_color(recipient.avatar_url)
438
440
)
0 commit comments