mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
Merge branch 'CMHopeSunshine:Bot' into Bot
This commit is contained in:
commit
ca8cc68856
@ -55,7 +55,7 @@ class ConfigModel(BaseModel):
|
|||||||
# 早报60s
|
# 早报60s
|
||||||
morning_news: str = Field('https://api.vvhan.com/api/60s', alias='早报60s')
|
morning_news: str = Field('https://api.vvhan.com/api/60s', alias='早报60s')
|
||||||
|
|
||||||
github_proxy: str = Field('https://github.cherishmoon.fun/', alias='github资源地址')
|
github_proxy: str = Field('https://github.cherishmoon.top/', alias='github资源地址')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def alias_dict(self):
|
def alias_dict(self):
|
||||||
|
@ -93,13 +93,13 @@ async def check_resource():
|
|||||||
len(list((RESOURCE_BASE_PATH / 'LittlePaimon').rglob('*'))) >= 50):
|
len(list((RESOURCE_BASE_PATH / 'LittlePaimon').rglob('*'))) >= 50):
|
||||||
try:
|
try:
|
||||||
await aiorequests.download(
|
await aiorequests.download(
|
||||||
url=f'{config.github_proxy}https://raw.githubusercontent.com/CMHopeSunshine/LittlePaimonRes/main/resources.zip',
|
url=f'{config.github_proxy}https://github.com/CMHopeSunshine/LittlePaimonRes/raw/main/resources.zip',
|
||||||
save_path=RESOURCE_BASE_PATH / '小派蒙基础资源.zip')
|
save_path=RESOURCE_BASE_PATH / '小派蒙基础资源.zip')
|
||||||
zipfile.ZipFile(RESOURCE_BASE_PATH / '小派蒙基础资源.zip').extractall(RESOURCE_BASE_PATH)
|
zipfile.ZipFile(RESOURCE_BASE_PATH / '小派蒙基础资源.zip').extractall(RESOURCE_BASE_PATH)
|
||||||
(RESOURCE_BASE_PATH / '小派蒙基础资源.zip').unlink()
|
(RESOURCE_BASE_PATH / '小派蒙基础资源.zip').unlink()
|
||||||
|
|
||||||
await aiorequests.download(
|
await aiorequests.download(
|
||||||
url=f'{config.github_proxy}https://raw.githubusercontent.com/CMHopeSunshine/GenshinWikiMap/master/resources/genshin_resources.zip',
|
url=f'{config.github_proxy}https://github.com/CMHopeSunshine/GenshinWikiMap/raw/master/resources/genshin_resources.zip',
|
||||||
save_path=RESOURCE_BASE_PATH / '原神图标资源.zip')
|
save_path=RESOURCE_BASE_PATH / '原神图标资源.zip')
|
||||||
zipfile.ZipFile(RESOURCE_BASE_PATH / '原神图标资源.zip').extractall(RESOURCE_BASE_PATH / 'LittlePaimon')
|
zipfile.ZipFile(RESOURCE_BASE_PATH / '原神图标资源.zip').extractall(RESOURCE_BASE_PATH / 'LittlePaimon')
|
||||||
(RESOURCE_BASE_PATH / '原神图标资源.zip').unlink()
|
(RESOURCE_BASE_PATH / '原神图标资源.zip').unlink()
|
||||||
@ -110,7 +110,7 @@ async def check_resource():
|
|||||||
if not (RESOURCE_BASE_PATH / 'LittlePaimon' / 'star_rail').is_dir():
|
if not (RESOURCE_BASE_PATH / 'LittlePaimon' / 'star_rail').is_dir():
|
||||||
try:
|
try:
|
||||||
await aiorequests.download(
|
await aiorequests.download(
|
||||||
url=f'{config.github_proxy}https://raw.githubusercontent.com/CMHopeSunshine/LittlePaimonRes/main/star_rail.zip',
|
url=f'{config.github_proxy}https://github.com/CMHopeSunshine/LittlePaimonRes/raw/main/star_rail.zip',
|
||||||
save_path=RESOURCE_BASE_PATH / 'star_rail.zip')
|
save_path=RESOURCE_BASE_PATH / 'star_rail.zip')
|
||||||
zipfile.ZipFile(RESOURCE_BASE_PATH / 'star_rail.zip').extractall(RESOURCE_BASE_PATH / 'LittlePaimon' / 'star_rail')
|
zipfile.ZipFile(RESOURCE_BASE_PATH / 'star_rail.zip').extractall(RESOURCE_BASE_PATH / 'LittlePaimon' / 'star_rail')
|
||||||
(RESOURCE_BASE_PATH / 'star_rail.zip').unlink()
|
(RESOURCE_BASE_PATH / 'star_rail.zip').unlink()
|
||||||
|
@ -378,8 +378,8 @@ other_form = Form(
|
|||||||
'value': 'https://ghproxy.com/'
|
'value': 'https://ghproxy.com/'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'github.cherishmoon.fun代理',
|
'label': 'github.cherishmoon.top代理',
|
||||||
'value': 'https://github.cherishmoon.fun/'
|
'value': 'https://github.cherishmoon.top/'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'github.91chi.fun代理',
|
'label': 'github.91chi.fun代理',
|
||||||
|
Loading…
Reference in New Issue
Block a user