mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 07:35:34 +08:00
add state and ctrl+C support for windows
This commit is contained in:
@@ -59,8 +59,7 @@ class BotCommand extends AnnotationBase implements Level
|
||||
/** @var int */
|
||||
public $level = 20;
|
||||
|
||||
/** @var array */
|
||||
private $arguments = [];
|
||||
private array $arguments = [];
|
||||
|
||||
public function __construct(
|
||||
$name = '',
|
||||
|
||||
@@ -19,23 +19,17 @@ use ZM\Annotation\AnnotationBase;
|
||||
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
|
||||
class BotEvent extends AnnotationBase
|
||||
{
|
||||
/** @var null|string */
|
||||
public $type;
|
||||
public ?string $type;
|
||||
|
||||
/** @var null|string */
|
||||
public $detail_type;
|
||||
public ?string $detail_type;
|
||||
|
||||
/** @var null|string */
|
||||
public $impl;
|
||||
public ?string $impl;
|
||||
|
||||
/** @var null|string */
|
||||
public $platform;
|
||||
public ?string $platform;
|
||||
|
||||
/** @var null|string */
|
||||
public $self_id;
|
||||
public ?string $self_id;
|
||||
|
||||
/** @var null|string */
|
||||
public $sub_type;
|
||||
public ?string $sub_type;
|
||||
|
||||
public function __construct(
|
||||
?string $type = null,
|
||||
|
||||
@@ -22,45 +22,23 @@ use ZM\Exception\ZMKnownException;
|
||||
class CommandArgument extends AnnotationBase implements ErgodicAnnotation
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @Required()
|
||||
*/
|
||||
public $name;
|
||||
public string $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $description = '';
|
||||
public string $description = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'string';
|
||||
public string $type = 'string';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $required = false;
|
||||
public bool $required = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $prompt = '';
|
||||
public string $prompt = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $default = '';
|
||||
public string $default = '';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $timeout = 60;
|
||||
public int $timeout = 60;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $error_prompt_policy = 1;
|
||||
public int $error_prompt_policy = 1;
|
||||
|
||||
/**
|
||||
* @param string $name 参数名称(可以是中文)
|
||||
|
||||
Reference in New Issue
Block a user