first commit

This commit is contained in:
Prometheus-first
2026-10-15 18:27:46 +08:00
commit 68eb19ea35
88 changed files with 10319 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
"""独立回声插件示例:echo 你好 → 你好。"""
class Plugin:
def on_load(self, ctx):
self.prefix = ctx.config.get("prefix", "echo ")
if not isinstance(self.prefix, str) or not self.prefix:
raise ValueError("echo.prefix 必须是非空字符串")
def on_message(self, message, ctx):
if message.type == 1 and message.text.startswith(self.prefix):
text = message.text[len(self.prefix):]
if text.strip():
ctx.reply(message, text)
+5
View File
@@ -0,0 +1,5 @@
{
"api": "v1",
"description": "发送 echo 文字,原样回复后面的文字",
"requires": ["text.receive", "text.send"]
}