mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-17 09:56:06 +00:00
feat: main.announcement 接口
This commit is contained in:
@@ -398,6 +398,12 @@ async def start_process(first_time_init=False):
|
||||
if len(new_announcement) > 0:
|
||||
for announcement in new_announcement:
|
||||
logging.critical("[公告]<{}> {}".format(announcement['time'], announcement['content']))
|
||||
|
||||
# 发送统计数据
|
||||
pkg.utils.context.get_center_v2_api().main.post_announcement_showed(
|
||||
[announcement['id'] for announcement in new_announcement]
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logging.warning("获取公告失败:{}".format(e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user