mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
add plugin make command
This commit is contained in:
14
src/Templates/main.php.template
Normal file
14
src/Templates/main.php.template
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$plugin = new ZMPlugin(__DIR__);
|
||||
|
||||
/*
|
||||
* 发送 "测试{name}",回复 "这是{name}插件的第一个命令!"
|
||||
*/
|
||||
$cmd1 = BotCommand::make('{name}', match: '测试{name}')->on(fn () => '这是{name}插件的第一个命令!');
|
||||
|
||||
$plugin->addBotCommand($cmd1);
|
||||
|
||||
return $plugin;
|
||||
Reference in New Issue
Block a user