mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 06:32:47 +00:00
moyu fix #207
This commit is contained in:
parent
0fac77a774
commit
aa87765ff1
@ -792,7 +792,7 @@
|
||||
},
|
||||
{
|
||||
"name": "moyu",
|
||||
"version": "1.01",
|
||||
"version": "1.02",
|
||||
"section": "daily",
|
||||
"maintainer": "sam01101",
|
||||
"size": "3.00 kb",
|
||||
|
2
moyu.py
2
moyu.py
@ -2,7 +2,6 @@
|
||||
|
||||
import datetime
|
||||
from random import choice
|
||||
from typing import Optional
|
||||
|
||||
import pytz
|
||||
from pagermaid import bot
|
||||
@ -68,6 +67,7 @@ def gen_text():
|
||||
result.append(f"\n**今天就是{fest_name}节,好好享受!**\n")
|
||||
else:
|
||||
fest_day_start_year = now.year + (1 if now_month > fest_month else 0)
|
||||
fest_day_start_year = fest_day_start_year + (1 if (now_month == fest_month and now_day > fest_day) else 0)
|
||||
fest_day_start = datetime.datetime(fest_day_start_year, fest_month, fest_day).replace(
|
||||
tzinfo=pytz.timezone("Asia/Shanghai"))
|
||||
time_left = abs((fest_day_start - now if fest_month == fest_day == 1 else now - fest_day_start).days)
|
||||
|
Loading…
Reference in New Issue
Block a user