This commit is contained in:
@@ -7,6 +7,14 @@ from .model import Action, Planner, seconds
|
||||
CN = timezone(timedelta(hours=8))
|
||||
|
||||
|
||||
def commission_quota_reason(snapshot):
|
||||
offset = (9 if (snapshot.raw.get("client_context") or {}).get("lang") == "JP" else 8) * 3600
|
||||
day = int((snapshot.now - 10 + offset) // 86400)
|
||||
reset_at = (day + 1) * 86400 - offset + 10
|
||||
stamp = datetime.fromtimestamp(reset_at, timezone(timedelta(seconds=offset))).strftime("%m-%d %H:%M:%S")
|
||||
return f"当日接取次数已用完(剩余0次),等待 {stamp} 自动刷新后继续"
|
||||
|
||||
|
||||
def commission_reason_kind(reason):
|
||||
text = str(reason or "")
|
||||
for kind, words in (
|
||||
|
||||
Reference in New Issue
Block a user