Skip to content

Commit

Permalink
<jx3>[feat]fix announce error
Browse files Browse the repository at this point in the history
  • Loading branch information
HornCopper committed Sep 9, 2024
1 parent 128294f commit 179e751
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/developer_tools/classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def _(event: MessageEvent, args: Message = CommandArg()):
echo = on_command("echo", force_whitespace=True, priority=5) # 复读只因功能

@echo.handle()
async def _(event: MessageEvent, args: Message = CommandArg()):
async def _(bot: Bot, event: MessageEvent, args: Message = CommandArg()):
if args.extract_plain_text() == "":
return
if not checker(str(event.user_id), 10):
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/jx3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ async def websocket_client(ws_url: str, headers: dict):
if name == "公告":
url, title = parsed.provide_data()
if re.match(r'(\d+)月(\d+)日(.*?)版本更新公告', title):
shutil.rmtree(ASSETS + "/jx3/update.png")
try:
shutil.rmtree(ASSETS + "/jx3/update.png")
except FileNotFoundError:
pass
await generate(
url,
True,
Expand Down

0 comments on commit 179e751

Please sign in to comment.