Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

echo

复读机插件,用于验证 Aster 的插件链路是否打通。

命令

命令 行为
echo <内容> 把内容原样发回
echo 显示用法
echo 我的名片 返回发送者的昵称、账号与会话类型

命令词独立成词,因此 echofoo 不会触发。

安装

# 1. 克隆框架与插件为兄弟目录
git clone https://github.com/MimoKit/aster.git
git clone https://github.com/xlinxt/aster-plugin-echo.git

# 2. 在框架里挂载插件(编辑 Cargo.toml 与 src/app.rs)

Cargo.toml:

[dependencies]
aster-plugin-echo = { path = "../aster-plugin-echo" }

src/app.rs 的插件注册处:

registry.register(aster_plugin_echo::plugin());
# 3. 重新构建
cd aster && cargo build --release

权限

所有命令均为 Permission::All,任何用户可用。需要限权时改 plugin() 里的 Rule::command("echo").permission(Permission::Master)。

许可

MIT

About

Aster 插件:复读机(示例)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages