refactor: 添加自定义Webhook配置项

This commit is contained in:
2025-09-27 15:10:05 +08:00
parent 57a3505cab
commit bb602d92cf

View File

@@ -109,6 +109,7 @@ class GlobalConfig(ConfigBase):
"Notify", "IfCompanyWebHookBot", False, BoolValidator()
)
Notify_CompanyWebHookBotUrl = ConfigItem("Notify", "CompanyWebHookBotUrl", "")
Notify_CustomWebhooks = ConfigItem("Notify", "CustomWebhooks", "[]", JSONValidator())
Update_IfAutoUpdate = ConfigItem("Update", "IfAutoUpdate", False, BoolValidator())
Update_Source = ConfigItem(
@@ -354,6 +355,7 @@ class MaaUserConfig(ConfigBase):
self.Notify_CompanyWebHookBotUrl = ConfigItem(
"Notify", "CompanyWebHookBotUrl", ""
)
self.Notify_CustomWebhooks = ConfigItem("Notify", "CustomWebhooks", "[]", JSONValidator())
def get_plan_info(self) -> Dict[str, Union[str, int]]:
"""获取当前的计划下信息"""
@@ -547,6 +549,7 @@ class GeneralUserConfig(ConfigBase):
self.Notify_CompanyWebHookBotUrl = ConfigItem(
"Notify", "CompanyWebHookBotUrl", ""
)
self.Notify_CustomWebhooks = ConfigItem("Notify", "CustomWebhooks", "[]", JSONValidator())
class GeneralConfig(ConfigBase):