add command manual plugin (#210)

This commit is contained in:
sunxyw
2022-12-28 22:05:03 +08:00
committed by GitHub
parent 383e0e22af
commit 0d24ae6192
6 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\OneBot;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Annotations\Annotation\Target;
use ZM\Annotation\AnnotationBase;
/**
* 机器人指令帮助注解
*
* @Annotation
* @NamedArgumentConstructor()
* @Target("METHOD")
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
class CommandHelp extends AnnotationBase
{
public function __construct(
public string $description,
public string $usage,
public string $example,
) {
}
public static function make(
string $description,
string $usage,
string $example,
): CommandHelp {
return new static(...func_get_args());
}
}