mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-20 15:15:35 +08:00
add PluginMeta to format plugin meta information
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user