🐛 Fix update time error

This commit is contained in:
xtaodada 2022-03-20 18:04:30 +08:00
parent b08cda5995
commit afa85889dd
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ from defs.source import from_list_to_name
from defs.utils import Module from defs.utils import Module
subs_msg = """ subs_msg = """
<code>{}</code> 有新的更新 <code>{}</code> <b>有新的更新</b>
<b>版本</b><code>{}</code> <b>版本</b><code>{}</code>
<b>更新时间</b><code>{}</code> <b>更新时间</b><code>{}</code>

View File

@ -33,7 +33,6 @@ class Module:
self.sourceUrl: str = data["sourceUrl"] if data["sourceUrl"] else "" self.sourceUrl: str = data["sourceUrl"] if data["sourceUrl"] else ""
self.hide: bool = data["hide"] self.hide: bool = data["hide"]
self.createdAt: str = strf_time(data["createdAt"]) self.createdAt: str = strf_time(data["createdAt"])
self.updatedAt: str = strf_time(data["updatedAt"])
text = [] text = []
for i in data["collaborators"]: for i in data["collaborators"]:
if i["name"]: if i["name"]:
@ -47,6 +46,7 @@ class Module:
for i in data["releases"]: for i in data["releases"]:
releases.append(Release(i)) releases.append(Release(i))
self.releases: List[Release] = releases self.releases: List[Release] = releases
self.updatedAt: str = releases[0].publishedAt if releases else strf_time(data["updatedAt"])
self.summary: str = data["summary"] if data["summary"] else "" self.summary: str = data["summary"] if data["summary"] else ""
self.scope: List[str] = data["scope"] if data["scope"] else [] self.scope: List[str] = data["scope"] if data["scope"] else []

View File

@ -3,7 +3,7 @@ from asyncio import sleep
from os import remove from os import remove
from random import uniform from random import uniform
from pyrogram.errors import FloodWait, ButtonUrlInvalid, MediaCaptionTooLong from pyrogram.errors import FloodWait, ButtonUrlInvalid
from pyrogram.types import Message from pyrogram.types import Message
from ci import app, scheduler, channel_id, admin_id, sqlite from ci import app, scheduler, channel_id, admin_id, sqlite