koishi-plugin-toram 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +2 -11
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -5,10 +5,6 @@ const koishi_1 = require("koishi");
|
|
|
5
5
|
exports.name = 'toram';
|
|
6
6
|
exports.Config = koishi_1.Schema.object({
|
|
7
7
|
机器人qq: koishi_1.Schema.string().default('机器人使用的QQ号').description('请在此处填写机器人使用的QQ号'),
|
|
8
|
-
/*
|
|
9
|
-
艾特转接_启用 : Schema.boolean().default(false).description('开启或关闭机器人收到的@消息转接'),
|
|
10
|
-
艾特转接_主号qq : Schema.string().default('你使用的QQ号').description('请在此处填写你主要使用的QQ号,机器人收到的@消息会转接到该账号'),
|
|
11
|
-
*/
|
|
12
8
|
版本等级: koishi_1.Schema.number().default(250).description('当前游戏等级版本'),
|
|
13
9
|
升级_定点王数量: koishi_1.Schema.number().default(6).description('使用升级指令时返回的定点王数量'),
|
|
14
10
|
升级_野王数量: koishi_1.Schema.number().default(4).description('使用升级指令时返回的野王数量'),
|
|
@@ -219,16 +215,11 @@ async function apply(ctx, config) {
|
|
|
219
215
|
}
|
|
220
216
|
});
|
|
221
217
|
// 被@时
|
|
222
|
-
ctx.middleware(async ({ session }, next
|
|
223
|
-
let { elements } = session
|
|
218
|
+
ctx.middleware(async ({ session }, next) => {
|
|
219
|
+
let { elements } = session;
|
|
224
220
|
for (const element of elements) {
|
|
225
221
|
if (element.type == "at") {
|
|
226
222
|
if (element.attrs.id == config.机器人qq) {
|
|
227
|
-
/*
|
|
228
|
-
if (config.艾特转接_启用 == true && text != undefined){
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
*/
|
|
232
223
|
return '魔导书现有功能:\n①升级 等级:查询该等级升级头目\n②天气预报:查看接下来' + config.天气预报_更新数量 + '次更新的内容\n③料理 料理名称 [料理等级]:查询高级料理名单(结果通常用拼音排序)\n④料理 玩家名称:查询该玩家的料理信息\n⑤游戏术语 [术语名称]:查询游戏术语';
|
|
233
224
|
}
|
|
234
225
|
}
|