初始化提交
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# ///
|
||||
# sample_plugin.py
|
||||
# 描述:示例自定义插件
|
||||
# ///
|
||||
|
||||
from plugins.base import PluginBase, PluginType
|
||||
|
||||
class SamplePlugin(PluginBase):
|
||||
plugin_name = "sample_plugin"
|
||||
plugin_version = "1.0.0"
|
||||
plugin_type = PluginType.CUSTOM
|
||||
plugin_description = "示例自定义插件"
|
||||
plugin_author = "User"
|
||||
|
||||
def initialize(self, config) -> bool:
|
||||
self.config = config
|
||||
return True
|
||||
|
||||
def execute(self, params) -> dict:
|
||||
return {
|
||||
"success": True,
|
||||
"message": "Sample plugin executed!",
|
||||
"params": params
|
||||
}
|
||||
Reference in New Issue
Block a user