♻️ reformat sub notice

This commit is contained in:
xtaodada 2022-03-20 20:24:31 +08:00
parent 2336332540
commit aa0d084ea6
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -10,7 +10,7 @@ from defs.source import from_list_to_name
from defs.utils import Module
subs_msg = """
<code>{}</code> <b>有新的更新</b>
<b>{}{}有新的更新</b>
<b>版本</b><code>{}</code>
<b>更新时间</b><code>{}</code>
@ -51,7 +51,8 @@ def gen_subs_msg(cid: int) -> str:
async def send_subs_msg(cid: int, data: Module, link: str):
return await app.send_message(cid,
subs_msg.format(data.name, data.latestRelease, data.updatedAt),
subs_msg.format(data.name, data.description,
data.latestRelease, data.updatedAt),
reply_markup=gen_subs_button(data, link))
@ -67,7 +68,8 @@ async def send_to_subscribes(data: Module):
await send_subs_msg(i, data, link)
except ButtonUrlInvalid:
print(f"Send button error")
await app.send_message(i, subs_msg.format(data.name, data.latestRelease, data.updatedAt), )
await app.send_message(i, subs_msg.format(data.name, data.description,
data.latestRelease, data.updatedAt), )
except BadRequest:
users.remove(i)
except Exception as e: