Keyword 插件使用教程 - 大佬篇
𝚠𝚑𝚒𝚕𝚎(𝟷) (𝚒𝚗𝚝*)𝚖𝚊𝚕𝚕𝚘𝚌(𝟼𝟻𝟻𝟹𝟼); | Memory Leak对于函数功能使用中产生的任何问题不提供帮助。
函数 ( -funcset )
1. 新建函数 ( -funcset new <func_name> )
需要附带插件文件或者回复含有插件文件的消息。
函数需要包含 main 函数,参数为 context,需要 async。
# 生成 1 - 100 的随机数 import random async def main(context): return random.randint(1, 100)
2. 从 REPO 获取函数 ( -funcset install <func_name> )
3. 删除函数 ( -funcset del <func_name> )
4. 获取函数文件 ( -funcset show <func_name> )
发送函数文件到聊天。
5. 列出函数 ( -funcset ls )
6. 使用 ( ${func_<func_name>} )
eg : -keyword new plain 'test' '${func_random}' ( 引用 random 函数的返回值 )