Skip to content

Commit e349c2f

Browse files
committed
Fixed a bug where the _id was used instead of key
?logs links will be work
1 parent 602a185 commit e349c2f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cogs/modmail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ async def logs(self, ctx, *, member: Union[discord.Member, discord.User, obj]=No
345345
new_day = date.strftime(r'%d %b %Y')
346346
time = date.strftime(r'%H:%M')
347347

348-
key = entry['_id']
348+
key = entry['key']
349349
closer = entry['closer']['name']
350350
log_url = f"https://logs.modmail.tk/{key}" if not self.bot.selfhosted else self.bot.config.log_url.strip('/') + f'/logs/{key}'
351351

core/time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class ShortTime:
1616
(?:(?P<weeks>[0-9]{1,4})(?:weeks?|w))? # e.g. 10w
1717
(?:(?P<days>[0-9]{1,5})(?:days?|d))? # e.g. 14d
1818
(?:(?P<hours>[0-9]{1,5})(?:hours?|h))? # e.g. 12h
19-
(?:(?P<minutes>[0-9]{1,5})(?:minutes?|m))? # e.g. 10m
20-
(?:(?P<seconds>[0-9]{1,5})(?:seconds?|s))? # e.g. 15s
19+
(?:(?P<minutes>[0-9]{1,5})(?:min(?:ute)?s?|m))? # e.g. 10m
20+
(?:(?P<seconds>[0-9]{1,5})(?:sec(?:ond)s?|s))? # e.g. 15s
2121
""", re.VERBOSE)
2222

2323
def __init__(self, argument):

0 commit comments

Comments
 (0)