Skip to content

iTXTech/mirai-kts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirai Kts

强大的 Mirai Kotlin Script 插件加载器

使用Kotlin Script编写 Mirai 插件,支持与所有Mirai API直接交互,现仅支持OpenJDK 8+环境。

使用须知

所有基于Mirai Kts的插件必须遵循AGPL-v3协议开放源代码,详见 协议文本

API可能随时变动,请保持更新!

特性

  • 极简语法,完整Kotlin语法支持
  • 高效率执行(缺点是冷启动较慢)
  • 字节码缓存机制,减少编译次数
  • 施主别着急,更多功能即将加入。先看看 例子 吧。

Mirai Kts 插件管理器 kpm

  1. mirai console 中键入 kpm 获得帮助
  2. kpm (Kotlin Script Plugin Manager) 可列出/启用/停用/加载/卸载插件查看插件信息
  3. 卸载插件不会真正发生类卸载事件,仅代表该插件生命周期结束,此时可以重新加载修改后的脚本

kpm [list|info|enable|disable|load|unload] (插件名/文件名)

开源协议

Copyright (C) 2020 iTX Technologies

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.