diff --git a/Plugins/WPSAPI.py b/Plugins/WPSAPI.py index abc1b7a..fb6e0ea 100644 --- a/Plugins/WPSAPI.py +++ b/Plugins/WPSAPI.py @@ -1004,11 +1004,14 @@ class WPSAPI(BasicWPSInterface): logger.Log("Error", f"{ConsoleFrontColor.RED}WPSAPI未配置主Webhook URL{ConsoleFrontColor.RESET}") return MAIN_WEBHOOK_URL != "" + def get_main_webhook_url(self) -> str: + return MAIN_WEBHOOK_URL + @override def get_webhook_url(self, message: str, chat_id: int, user_id: int) -> str: webhook_url = ProjectConfig().GetFile(f"webhook_url/{chat_id}",True).LoadAsText() if webhook_url == "": - webhook_url = MAIN_WEBHOOK_URL + webhook_url = self.get_main_webhook_url() return webhook_url @override diff --git a/Plugins/WPSGardenSystem/garden_plugin_steal.py b/Plugins/WPSGardenSystem/garden_plugin_steal.py index b0f377b..7f46e41 100644 --- a/Plugins/WPSGardenSystem/garden_plugin_steal.py +++ b/Plugins/WPSGardenSystem/garden_plugin_steal.py @@ -2,9 +2,7 @@ from __future__ import annotations -from typing import Optional, Sequence - -from PWF.Convention.Runtime.Architecture import Architecture +from PWF.Convention.Runtime.Architecture import * from PWF.CoreModules.database import get_db from Plugins.WPSAPI import GuideEntry @@ -15,6 +13,10 @@ from .garden_plugin_base import WPSGardenBase class WPSGardenSteal(WPSGardenBase): + @override + def get_webhook_url(self, message: str, chat_id: int, user_id: int) -> str: + return self.get_main_webhook_url() + def get_guide_subtitle(self) -> str: return "偷取其他用户成熟果实的互动指令"