koishi-plugin-toram 0.6.2-test.2 → 0.6.2-test.4

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.
Files changed (2) hide show
  1. package/lib/index.js +8 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -215,9 +215,14 @@ async function apply(ctx, config) {
215
215
  }
216
216
  });
217
217
  // 被@时
218
- ctx.middleware(async ({ session }, next) => {
219
- if (session.Element.type == "at" && session.Element.attrs.id == config.机器人qq) {
220
- return '魔导书现有功能:\n①升级 等级:查询该等级升级头目\n②天气预报:查看接下来' + config.天气预报_更新数量 + '次更新的内容\n③料理 料理名称 [料理等级]:查询高级料理名单(结果通常用拼音排序)\n④料理 玩家名称:查询该玩家的料理信息\n⑤游戏术语 [术语名称]:查询游戏术语';
218
+ ctx.middleware(async (session, next) => {
219
+ let { elements } = session;
220
+ for (const element of elements) {
221
+ if (element.type == "at") {
222
+ if (element.attrs.id == config.机器人qq) {
223
+ return '魔导书现有功能:\n①升级 等级:查询该等级升级头目\n②天气预报:查看本次大更新的覆盖内容\n③料理 料理名称 [料理等级]:查询高级料理名单(结果通常用拼音排序)\n④料理 玩家名称:查询该玩家的料理信息\n⑤游戏术语 [术语名称]:查询游戏术语';
224
+ }
225
+ }
221
226
  }
222
227
  return next();
223
228
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-toram",
3
3
  "description": "托拉姆物语小工具",
4
- "version": "0.6.2-test.2",
4
+ "version": "0.6.2-test.4",
5
5
  "contributors": [
6
6
  "青灯 <1874053520@qq.com>"
7
7
  ],