mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
修复早报60s (#465)
* 🔧 自动更新依赖文件
* 修改早报60s为可配置项,修改路径在派蒙管理后台:首页->配置项管理->其他配置
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
d1f345e730
commit
a9d4048059
@ -51,6 +51,9 @@ class ConfigModel(BaseModel):
|
||||
|
||||
command_alias_enable: bool = Field(True, alias='启用命令别名')
|
||||
|
||||
# 早报60s
|
||||
morning_news: str = Field('https://api.vvhan.com/api/60s', alias='早报60s')
|
||||
|
||||
github_proxy: str = Field('https://github.cherishmoon.fun/', alias='github资源地址')
|
||||
|
||||
@property
|
||||
|
@ -4,6 +4,7 @@ from nonebot import get_bot, on_command
|
||||
from nonebot.adapters.onebot.v11 import MessageEvent, MessageSegment
|
||||
from nonebot.plugin import PluginMetadata
|
||||
|
||||
from LittlePaimon.config import config
|
||||
from LittlePaimon.database import GeneralSub
|
||||
from LittlePaimon.utils import scheduler, logger, DRIVER
|
||||
from LittlePaimon.utils.message import CommandObjectID, CommandSwitch, CommandTime
|
||||
@ -23,6 +24,7 @@ __plugin_meta__ = PluginMetadata(
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
news = on_command('早报', aliases={'今日早报', '今日新闻', '60s读世界', '60秒读世界'}, priority=14, block=True)
|
||||
|
||||
|
||||
@ -30,7 +32,7 @@ news = on_command('早报', aliases={'今日早报', '今日新闻', '60s读世
|
||||
async def _(event: MessageEvent, sub_id=CommandObjectID(), switch=CommandSwitch(), sub_time=CommandTime()):
|
||||
if switch is None:
|
||||
await news.send('60秒读世界新闻获取中,请稍等...')
|
||||
await news.finish(MessageSegment.image(file='https://api.emoao.com/api/60s'))
|
||||
await news.finish(MessageSegment.image(file=config.morning_news))
|
||||
else:
|
||||
sub_data = {
|
||||
'sub_id': sub_id,
|
||||
@ -101,7 +103,7 @@ async def send_news(sub_id: int, sub_type: str, extra_id: Optional[int]):
|
||||
else:
|
||||
api = 'send_group_msg'
|
||||
data = {'group_id': sub_id}
|
||||
data['message'] = MessageSegment.image(file='https://api.emoao.com/api/60s')
|
||||
data['message'] = MessageSegment.image(file=config.morning_news)
|
||||
await get_bot().call_api(api, **data)
|
||||
logger.info('60秒读世界', '', {sub_type: sub_id}, '推送成功', True)
|
||||
except Exception as e:
|
||||
|
@ -338,6 +338,13 @@ other_form = Form(
|
||||
suffix='秒',
|
||||
min=5,
|
||||
),
|
||||
InputText(
|
||||
label='早报60s',
|
||||
name='早报60s',
|
||||
value='${早报60s}',
|
||||
placeholder='请填写早报60s的API地址',
|
||||
labelRemark=Remark(shape='circle', content='修改早报60s的API地址,不填则使用默认地址')
|
||||
),
|
||||
Select(
|
||||
label='github资源地址',
|
||||
name='github资源地址',
|
||||
|
842
poetry.lock
generated
842
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -2,52 +2,52 @@
|
||||
|
||||
aiosqlite==0.17.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
amis-python==1.0.8.post2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
anyio==3.7.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
apscheduler==3.10.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
anyio==3.7.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
apscheduler==3.10.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
backports-zoneinfo==0.2.1 ; python_version >= "3.8" and python_version < "3.9"
|
||||
beautifulsoup4==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
certifi==2023.5.7 ; python_version >= "3.8" and python_version < "4.0"
|
||||
click==8.1.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
certifi==2023.7.22 ; python_version >= "3.8" and python_version < "4.0"
|
||||
click==8.1.6 ; python_version >= "3.8" and python_version < "4.0"
|
||||
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and (platform_system == "Windows" or sys_platform == "win32")
|
||||
contourpy==1.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
cycler==0.11.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
ecdsa==0.18.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
exceptiongroup==1.1.1 ; python_version >= "3.8" and python_version < "3.11"
|
||||
exceptiongroup==1.1.3 ; python_version >= "3.8" and python_version < "3.11"
|
||||
expandvars==0.9.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
fastapi==0.97.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
fonttools==4.40.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
fastapi==0.101.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
fonttools==4.42.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
gitdb==4.0.10 ; python_version >= "3.8" and python_version < "4.0"
|
||||
gitpython==3.1.31 ; python_version >= "3.8" and python_version < "4.0"
|
||||
gitpython==3.1.32 ; python_version >= "3.8" and python_version < "4.0"
|
||||
greenlet==2.0.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
h11==0.14.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
httpcore==0.16.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
httptools==0.5.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
httptools==0.6.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
httpx==0.23.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
idna==3.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
importlib-resources==5.12.0 ; python_version >= "3.8" and python_version < "3.10"
|
||||
importlib-resources==6.0.1 ; python_version >= "3.8" and python_version < "3.10"
|
||||
iso8601==1.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
jieba==0.42.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
jinja2==3.1.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
joblib==1.2.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
joblib==1.3.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
kiwisolver==1.4.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
loguru==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
lxml==4.9.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
lxml==4.9.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
markupsafe==2.1.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
matplotlib==3.7.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
matplotlib==3.7.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
msgpack==1.0.5 ; python_version >= "3.8" and python_version < "4.0"
|
||||
multidict==6.0.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot-adapter-onebot==2.2.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot-adapter-onebot==2.2.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot-plugin-apscheduler==0.2.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot2==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot2[fastapi]==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
numpy==1.24.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot2==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
nonebot2[fastapi]==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
numpy==1.24.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
packaging==23.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pillow==9.5.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
playwright==1.35.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
playwright==1.37.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
psutil==5.9.5 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pyasn1==0.5.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pydantic==1.10.9 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pydantic[dotenv]==1.10.9 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pydantic==1.10.12 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pydantic[dotenv]==1.10.12 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pyee==9.0.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pygtrie==2.5.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pyparsing==3.0.9 ; python_version >= "3.8" and python_version < "4.0"
|
||||
@ -58,33 +58,32 @@ python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
python-dotenv==1.0.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
python-jose==3.3.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pytz==2023.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pyyaml==6.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
qrcode==7.4.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
rfc3986[idna2008]==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
rsa==4.9 ; python_version >= "3.8" and python_version < "4"
|
||||
ruamel-yaml-clib==0.2.7 ; platform_python_implementation == "CPython" and python_version < "3.12" and python_version >= "3.8"
|
||||
ruamel-yaml==0.17.31 ; python_version >= "3.8" and python_version < "4.0"
|
||||
scikit-learn==1.2.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
ruamel-yaml==0.17.32 ; python_version >= "3.8" and python_version < "4.0"
|
||||
scikit-learn==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
scipy==1.9.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
setuptools==67.8.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
shapely==1.8.5.post1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
smmap==5.0.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sniffio==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
soupsieve==2.4.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
starlette==0.27.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
threadpoolctl==3.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
threadpoolctl==3.2.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
tomli==2.0.1 ; python_version >= "3.8" and python_version < "3.11"
|
||||
tortoise-orm==0.19.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
tqdm==4.65.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
typing-extensions==4.6.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
tqdm==4.66.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
typing-extensions==4.7.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
tzdata==2023.3 ; python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows"
|
||||
tzlocal==5.0.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
ujson==5.8.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
uvicorn[standard]==0.22.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
uvicorn[standard]==0.23.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
uvloop==0.17.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.8" and python_version < "4.0"
|
||||
watchfiles==0.19.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
websockets==11.0.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
win32-setctime==1.1.0 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
|
||||
yarl==1.9.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
zipp==3.15.0 ; python_version >= "3.8" and python_version < "3.10"
|
||||
zipp==3.16.2 ; python_version >= "3.8" and python_version < "3.10"
|
||||
|
Loading…
Reference in New Issue
Block a user