mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 07:35:34 +08:00
add bot crafting command
This commit is contained in:
@@ -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",
|
||||
|
||||
22
src/ZM/Command/BotCraft/BotCraftCommand.php
Normal file
22
src/ZM/Command/BotCraft/BotCraftCommand.php
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user