一些聊天机器人小游戏的纯逻辑实现
本项目中所有的文件都是完全脱离平台的。
请将您需要的小游戏文件夹下载至您机器人的路径中,然后在您机器人的入口文件或插件文件中导入该文件,例如:
// Common JS
const GameName = require('./GameName/gameName.js');
// 或 ES6
import GameName from './GameName/gameName.js';
随后可以通过 GameName
的成员函数运行小游戏并与之交互。
函数只接受必要的数据作为参数,如群唯一值、个人唯一值与其他游戏操作相关的参数。您需要自行处理原始消息,如截取字符串等。
函数的返回值是一个自定义对象,表示游戏运行的状态。具体的状态码与其他属性的含义请阅读代码与文档注释。
游戏产生的所有数据只存储在内存中,一旦母程序重启将不可恢复。
Bug 反馈请联系:
QQ: 2233056717
Email: [email protected]