mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
修复时间表命令的参数格式问题
This commit is contained in:
parent
e236e24032
commit
69eae5197e
@ -76,7 +76,7 @@ def anime_timeline(args_text, ctx_msg, internal=False, argv=None):
|
|||||||
|
|
||||||
if re.fullmatch('\d{1,2}-\d{1,2}', argv[0]):
|
if re.fullmatch('\d{1,2}-\d{1,2}', argv[0]):
|
||||||
# month-day
|
# month-day
|
||||||
date_str = argv[0]
|
date_str = '%02d-%02d' % tuple(map(lambda x: int(x), argv[0].split('-')))
|
||||||
argv = argv[1:]
|
argv = argv[1:]
|
||||||
elif re.fullmatch('-?\d', argv[0]):
|
elif re.fullmatch('-?\d', argv[0]):
|
||||||
# timedelta (days)
|
# timedelta (days)
|
||||||
|
Loading…
Reference in New Issue
Block a user