mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
15 lines
314 B
Plaintext
15 lines
314 B
Plaintext
<?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;
|