Skip to content

Commit 601fb88

Browse files
committed
Show closed by in logs command
1 parent 9d323db commit 601fb88

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cogs/modmail.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,17 @@ async def logs(self, ctx, *, member: Union[discord.Member, discord.User, obj]=No
343343

344344
key = entry['key']
345345
user_id = entry['user_id']
346+
closer = entry['closer']['name']
346347
log_url = f"https://logs.modmail.tk/{user_id}/{key}"
347348

348-
truncate = lambda c: c[:47] + '...' if len(c) > 50 else c
349+
truncate = lambda c: c[:47].strip() + '...' if len(c) > 50 else c
349350

350351
if entry['messages']:
351352
short_desc = truncate(entry['messages'][0]['content']) or 'No content'
352353
else:
353354
short_desc = 'No content'
354355

355-
fmt += f"[`[{time}]{key}`]({log_url}) - {short_desc}\n"
356-
357-
print(fmt)
356+
fmt += f"[`[{time}][closed-by:{closer}]`]({log_url}) - {short_desc}\n"
358357

359358
if current_day != new_day or index == len(closed_logs) - 1:
360359
embeds[-1].add_field(name=current_day, value=fmt, inline=False)

0 commit comments

Comments
 (0)