This commit is contained in:
DancingSnow 2022-07-28 22:39:52 +08:00 committed by GitHub
parent aed435d0dc
commit 5b37cbac81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,7 +279,7 @@ async def myzj_handler(event: MessageEvent, msg: Message = CommandArg()):
elif month_now == 2: elif month_now == 2:
month_list = ['12', '1', '2'] month_list = ['12', '1', '2']
else: else:
month_list = [str(month_now - 2), str(month_now - 1)] month_list = [str(month_now - 2), str(month_now - 1), month_now]
find_month = '(?P<month>' + '|'.join(month_list) + ')' find_month = '(?P<month>' + '|'.join(month_list) + ')'
match = re.search(find_month, msg) match = re.search(find_month, msg)
month = match.group('month') if match else month_now month = match.group('month') if match else month_now