优化菜园消息推送逻辑
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user