koishi-plugin-dew-bot 1.0.210 → 1.0.232

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.
@@ -13,17 +13,21 @@ class handel_base {
13
13
  this.ctx = ctx;
14
14
  }
15
15
  async send(data, content) {
16
- // console.log('handel_base:::send', data, content)
16
+ console.log('handel_base:::send', data, content);
17
17
  // let sendInfo = data.Message;
18
18
  let session = sessions_1.default.get(data.userId);
19
19
  if (!session) {
20
20
  this.ctx.logger.info('session not found', data.userId);
21
21
  return;
22
22
  }
23
- // if(session.bot.platform){
24
- // content = '\n' + content;
25
- // }
26
- await session.send(content);
23
+ /** 为了美观,如果是qq平台并且是群聊,在消息前面添加换行符 **/
24
+ let finalContent = content;
25
+ // 判断是否是qq平台并且是群聊:channel.type === 0 表示群聊
26
+ if (session.event?.platform === 'qq' && session.event?.channel?.type === 0) {
27
+ // 如果 content 是字符串,直接添加换行符
28
+ finalContent = 'Ciallo~(∠・ω< )\n' + content;
29
+ }
30
+ await session.send(finalContent);
27
31
  }
28
32
  start(data) {
29
33
  // console.log('handel_base:::', data)
@@ -25,9 +25,9 @@ class class_battleLog {
25
25
  let result = '';
26
26
  /** 战斗结果 */
27
27
  result += this.formatBattleResult(battleData);
28
- /** Flarum战斗日志链接 */
29
- if (battleData.flarumUrl) {
30
- result += `📋战斗日志:${battleData.flarumUrl}\n`;
28
+ /** NodeBB战斗日志链接 */
29
+ if (battleData.nodebbUrl) {
30
+ result += `⚔️战斗日志:${battleData.nodebbUrl}\n`;
31
31
  }
32
32
  /** 奖励信息 */
33
33
  result += this.formatRewards(battleData);
@@ -85,7 +85,7 @@ class class_battleLog {
85
85
  return result;
86
86
  }
87
87
  /** 添加战斗收获分隔线 */
88
- result += ` ┄━═🎉战斗收获═━┄\n`;
88
+ result += ` ┄━═🎁战斗收获═━┄\n`;
89
89
  /** 遍历奖励 */
90
90
  const rewardsIterator = rewards instanceof Map ? rewards.entries() : Object.entries(rewards);
91
91
  for (const [unitId, unitReward] of rewardsIterator) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "koishi-plugin-dew-bot",
3
3
  "description": "达尔文进化岛",
4
4
  "preview": true,
5
- "version": "1.0.210",
5
+ "version": "1.0.232",
6
6
  "main": "dist/index.js",
7
7
  "typings": "dist/index.d.ts",
8
8
  "contributors": [
@@ -16,7 +16,7 @@
16
16
  "scripts": {
17
17
  "prepub": "npm version patch",
18
18
  "checkorg": "npm config set registry https://registry.npmjs.org/",
19
- "pub": "npm run prepub && npm publish",
19
+ "pub": "npm run prepub && npm publish --registry https://registry.npmjs.org/",
20
20
  "copy-js": "robocopy ./src/html/res dist/html/res /S /E /COPYALL /R:0 /W:0 && echo res 文件已复制"
21
21
  },
22
22
  "keywords": [
package/readme.md CHANGED
@@ -5,28 +5,76 @@
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
6
6
  [![GitHub Views](https://komarev.com/ghpvc/?username=your-username&repo=koishi-plugin-dew-bot&color=blue&style=flat-square)](https://github.com/your-username/koishi-plugin-dew-bot)
7
7
 
8
+ ---
8
9
 
9
10
  ## 📖 介绍
10
11
 
11
- 基于《无限恐怖》为蓝本的文字RPG游戏
12
+ **koishi-plugin-dew-bot** 是一款基于《无限恐怖》为蓝本开发的文字 RPG 游戏插件,为 Koishi 框架提供强大的游戏功能支持。
12
13
 
13
- ## ✨特色
14
- - 🎯 **无需记忆指令** - 直观简介的指令系统
15
- - 🌍 **多平台支持** - 基于服务器的消息处理,支持QQ、微信、Telegram等多个平台,也可以接入任何平台,只需要支持WS协议即可,接入可参考文档TSRPC 接入方法
14
+ 通过本插件,你可以在聊天平台中体验紧张刺激的无限流游戏,感受主神空间的魅力!
15
+
16
+ ---
17
+
18
+ ## ✨ 特色功能
19
+
20
+ ### 🎯 直观的指令系统
21
+ - **无需记忆复杂指令** - 采用直观简洁的指令系统,降低学习成本
22
+ - **智能交互** - 友好的交互体验,让游戏更易上手
23
+
24
+ ### 🌍 多平台支持
25
+ - **广泛兼容** - 支持 QQ、微信、Telegram 等多个主流平台
26
+ - **灵活扩展** - 基于服务器的消息处理架构,可接入任何支持 WebSocket 协议的平台
27
+ - **技术栈** - 基于 TSRPC 框架,参考 [TSRPC](https://tsrpc.cn/) 可快速接入新平台
28
+
29
+ ### 🚀 高性能架构
30
+ - **服务器分离** - 采用服务器端处理架构,保证游戏逻辑的稳定运行
31
+ - **实时通信** - 基于 WebSocket 协议,实现低延迟的实时交互
32
+
33
+ ---
16
34
 
17
35
  ## 🔗 相关链接
18
- - 🌐 [tsrpc-TS全栈框架](https://tsrpc.cn/)
19
- - 🖥️ [服务器(开发中)](https://gitee.com/ChuXuanD30/bot_server_v6)
20
- - 🌐 [Web端源码-VUE3](https://gitee.com/ChuXuanD30/bot_server_backend)
21
- ## ✨开发计划
22
- - **一期-底层架构** - ✅RPG核心技能/战斗/消息处理等基础功能
23
- - **一期-基础功能** - ✅RPG基础功能设计 交易所/背包/装备/技能/宠物/任务/排行榜/邮件系统
24
- - **一期-测试优化** - 🔄功能体验测试,阶段性整理重构以便下一步开发,交互优化
36
+
37
+ | 项目 | 链接 | 状态 |
38
+ |------|------|------|
39
+ | 🌐 **TSRPC 框架** | [TSRPC 官网](https://tsrpc.cn/) | 官方文档 |
40
+ | 🖥️ **服务器端** | [服务器源码](https://gitee.com/ChuXuanD30/bot_server_v6) | 开发中 |
41
+ ---
42
+
43
+ ## 📋 开发计划
44
+
45
+ > 💡 **开发理念**: 做到哪就是哪,持续迭代优化
46
+
47
+ ---
25
48
 
26
49
  ## 🤝 贡献指南
27
50
 
28
- 如果你有任何与游戏相关的建议或意见,欢迎提交 Issue 或 邮箱🎮✨
51
+ ### 📌 使用说明
52
+
53
+ 本项目目前主要用于个人使用。如需体验,可在 **Koishi 沙盒**中测试,或联系我为你的平台提供支持和测试。
54
+
55
+ ### 💬 反馈与建议
56
+
57
+ 如果你有任何与游戏相关的建议或意见,欢迎通过以下方式联系:
58
+
59
+ - 📝 提交 **Issue** 反馈问题或建议
60
+ - 📮 发送邮件至:<3245000000@qq.com>
61
+ - 💬 加入讨论群:[🌍 达尔文进化岛](https://qm.qq.com/q/h1iprRcely)
62
+
63
+ ---
64
+
65
+ ## 📧 联系方式
66
+
67
+ | 方式 | 信息 |
68
+ |------|------|
69
+ | 📮 **邮箱** | <3245000000@qq.com> |
70
+ | 💬 **讨论群** | [🌍 达尔文进化岛](https://qm.qq.com/q/h1iprRcely) |
71
+
72
+ ---
73
+
74
+ <div align="center">
75
+
76
+ **⭐ 如果你有创意或者想法,欢迎参与讨论!**
77
+
78
+ Made with ❤️ by [ChuXuanD30](https://gitee.com/ChuXuanD30)
29
79
 
30
- ### 📧 联系方式
31
- - 📮 **邮箱**: <3245000000@qq.com>
32
- - 💬 **讨论**: [🌍达尔文进化岛](https://qm.qq.com/q/h1iprRcely)
80
+ </div>