update to 1.2 version

Generate systemd script
Default info_level set to 2
Modify & add some comment for Example module
Brand new Console
Add daemon command argument
Add #OnTick annotation
Add ZMRobot API class
This commit is contained in:
whale
2020-04-29 15:29:56 +08:00
parent e1983d6dd8
commit 169a751e0f
31 changed files with 872 additions and 200 deletions

View File

@@ -18,7 +18,7 @@ class CQ
if (is_numeric($qq) || $qq === "all") {
return "[CQ:at,qq=" . $qq . "]";
}
Console::error("传入的QQ号码($qq)错误!");
Console::warning("传入的QQ号码($qq)错误!");
return " ";
}
@@ -31,7 +31,7 @@ class CQ
if (is_numeric($id)) {
return "[CQ:face,id=" . $id . "]";
}
Console::error("传入的face id($id)错误!");
Console::warning("传入的face id($id)错误!");
return " ";
}
@@ -44,7 +44,7 @@ class CQ
if (is_numeric($id)) {
return "[CQ:emoji,id=" . $id . "]";
}
Console::error("传入的emoji id($id)错误!");
Console::warning("传入的emoji id($id)错误!");
return " ";
}
@@ -66,7 +66,7 @@ class CQ
if (is_numeric($id)) {
return "[CQ:sface,id=" . $id . "]";
}
Console::error("传入的sface id($id)错误!");
Console::warning("传入的sface id($id)错误!");
return " ";
}
@@ -151,7 +151,7 @@ class CQ
return "[CQ:music,type=$type,id=$id_or_url]";
case "custom":
if ($title === null || $audio === null) {
Console::error("传入CQ码实例的标题和音频链接不能为空");
Console::warning("传入CQ码实例的标题和音频链接不能为空");
return " ";
}
if ($content === null) $c = "";
@@ -160,7 +160,7 @@ class CQ
else $i = ",image=" . $image;
return "[CQ:music,type=custom,url=" . $id_or_url . ",audio=" . $audio . ",title=" . $title . $c . $i . "]";
default:
Console::error("传入的music type($type)错误!");
Console::warning("传入的music type($type)错误!");
return " ";
}
}
@@ -217,4 +217,4 @@ class CQ
}
return $msg;
}
}
}