This commit is contained in:
hibiki
2021-08-04 15:19:45 +08:00
parent b62399e203
commit 910af434ae
22 changed files with 571 additions and 700 deletions
+11 -3
View File
@@ -12,15 +12,22 @@ __plugin_name__ = "更新色图 [Hidden]"
__plugin_usage__ = '无'
exists_flag = False
update_setu = on_command("更新色图", rule=to_me(), permission=SUPERUSER, priority=1, block=True)
@update_setu.handle()
async def _(bot: Bot, event: Event, state: T_State):
global exists_flag
if DOWNLOAD_SETU:
await update_setu.send("开始更新色图...", at_sender=True)
await update_setu.finish(await update_setu_img(), at_sender=True)
if not exists_flag:
exists_flag = True
await update_setu.send("开始更新色图...", at_sender=True)
await update_setu.send(await update_setu_img(), at_sender=True)
exists_flag = False
else:
await update_setu.finish("色图正在更新....")
else:
await update_setu.finish('更新色图配置未开启')
@@ -32,5 +39,6 @@ async def _(bot: Bot, event: Event, state: T_State):
minute=30,
)
async def _():
if DOWNLOAD_SETU:
global exists_flag
if DOWNLOAD_SETU and not exists_flag:
await update_setu_img()