add PluginMeta to format plugin meta information

This commit is contained in:
crazywhalecc
2023-01-12 09:45:01 +08:00
parent 8c491e4290
commit 6854304d64
12 changed files with 448 additions and 149 deletions

View File

@@ -21,6 +21,13 @@ class BotAction extends AnnotationBase implements Level
{
}
public static function make(callable $callback, string $action, bool $need_response = false, int $level = 20): BotAction
{
$action = new BotAction($action, $need_response, $level);
$action->on($callback);
return $action;
}
public function getLevel()
{
return $this->level;