add bot crafting command

This commit is contained in:
crazywhalecc
2022-08-21 16:04:20 +08:00
parent 4ba74e9f3e
commit ebdada57a6
3 changed files with 26 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
}
],
"require": {
"php": "^7.2 || ^7.3 || ^7.4 || ^8.0 || ^8.1",
"php": "^7.4 || ^8.0 || ^8.1",
"ext-json": "*",
"doctrine/dbal": "^2.13.1",
"dragonmantank/cron-expression": "^3.3",
@@ -22,7 +22,7 @@
"koriym/attributes": "^1.0",
"onebot/libonebot": "dev-develop",
"psr/container": "^2.0",
"symfony/console": "~6.0 || ~5.0 || ~4.0",
"symfony/console": "^6.0 || ^5.0 || ^4.0",
"symfony/polyfill-ctype": "^1.19",
"symfony/polyfill-mbstring": "^1.19",
"symfony/polyfill-php80": "^1.16",

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace ZM\Command\BotCraft;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* TODO: 用于从命令行创建插件
*/
class BotCraftCommand extends Command
{
protected static $defaultName = 'bc:make';
public function execute(InputInterface $input, OutputInterface $output)
{
return 0;
}
}

View File

@@ -9,6 +9,7 @@ use Phar;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use ZM\Command\BotCraft\BotCraftCommand;
use ZM\Command\BuildCommand;
use ZM\Command\CheckConfigCommand;
use ZM\Command\Generate\SystemdGenerateCommand;
@@ -43,6 +44,7 @@ final class ConsoleApplication extends Application
$this->add(new ServerStopCommand()); // server停止
$this->add(new ServerStartCommand()); // 运行主服务的指令控制器
$this->add(new SystemdGenerateCommand()); // 生成systemd文件
$this->add(new BotCraftCommand()); // 用于从命令行创建插件
if (LOAD_MODE === 1) { // 如果是 Composer 模式加载的,那么可以输入 check:config 命令,检查配置文件是否需要更新
$this->add(new CheckConfigCommand());
}