diff --git a/src/plugins/willing/mode_classical.py b/src/plugins/willing/mode_classical.py index df9952b4e..4bc3fb6e9 100644 --- a/src/plugins/willing/mode_classical.py +++ b/src/plugins/willing/mode_classical.py @@ -79,5 +79,11 @@ class ClassicalWillingManager(BaseWillingManager): async def not_reply_handle(self, message_id): return await super().not_reply_handle(message_id) + + async def get_variable_parameters(self): + return await super().get_variable_parameters() + + async def set_variable_parameters(self, parameters): + return await super().set_variable_parameters(parameters) \ No newline at end of file diff --git a/src/plugins/willing/mode_dynamic.py b/src/plugins/willing/mode_dynamic.py index 0727307ce..b9c324fca 100644 --- a/src/plugins/willing/mode_dynamic.py +++ b/src/plugins/willing/mode_dynamic.py @@ -241,3 +241,8 @@ class DynamicWillingManager(BaseWillingManager): async def after_generate_reply_handle(self, message_id): return await super().after_generate_reply_handle(message_id) + async def get_variable_parameters(self): + return await super().get_variable_parameters() + + async def set_variable_parameters(self, parameters): + return await super().set_variable_parameters(parameters) \ No newline at end of file diff --git a/src/plugins/willing/willing_manager.py b/src/plugins/willing/willing_manager.py index 31a0b2663..11442ae77 100644 --- a/src/plugins/willing/willing_manager.py +++ b/src/plugins/willing/willing_manager.py @@ -148,6 +148,16 @@ class BaseWillingManager(ABC): async with self.lock: self.chat_reply_willing[chat_id] = willing + @abstractmethod + async def get_variable_parameters(self) -> Dict[str, str]: + """抽象方法:获取可变参数""" + pass + + @abstractmethod + async def set_variable_parameters(self, parameters: Dict[str, any]): + """抽象方法:设置可变参数""" + pass + def init_willing_manager() -> BaseWillingManager: """