node-karin 0.5.1 → 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.
@@ -77,7 +77,7 @@ export const segment = new (class Segment {
77
77
  const file_type = options.file_type || 'original'
78
78
  const name = options.name || ''
79
79
  const md5 = options.md5 || ''
80
- const sub_type = options.sub_type || 0
80
+ const sub_type = options.sub_type || ''
81
81
  const width = options.width || 0
82
82
  const height = options.height || 0
83
83
  return {
@@ -118,6 +118,7 @@ export const segment = new (class Segment {
118
118
  * @param md5 - 语音md5
119
119
  * @param name - 语音名称
120
120
  * @returns {VoiceElement} 语音元素
121
+ * @deprecated 即将废弃 请使用segment.record
121
122
  */
122
123
  voice (file, magic = false, md5 = '', name = '') {
123
124
  return {
@@ -206,7 +207,7 @@ export const segment = new (class Segment {
206
207
  * @param pic - 封面
207
208
  * @returns {CustomMusicElemen} 自定义音乐元素
208
209
  */
209
- customMusic (url, audio, title, author, pic) {
210
+ customMusic (url, audio, title, author, pic, id) {
210
211
  return {
211
212
  type: 'music',
212
213
  platform: 'custom',
@@ -215,6 +216,7 @@ export const segment = new (class Segment {
215
216
  title,
216
217
  author,
217
218
  pic,
219
+ id,
218
220
  }
219
221
  }
220
222
 
package/modules.d.ts CHANGED
@@ -11,4 +11,5 @@ import { Level as level } from 'level';
11
11
  import schedule from 'node-schedule';
12
12
  import yaml from 'yaml';
13
13
  import log4js from 'log4js';
14
- export { fs, ws, path, axios, lodash, moment, express, chalk, chokidar, level, schedule, yaml, log4js, };
14
+ import art_template from 'art-template';
15
+ export { fs, ws, path, axios, lodash, moment, express, chalk, chokidar, level, schedule, yaml, log4js, art_template, };
package/modules.js CHANGED
@@ -11,4 +11,5 @@ import { Level as level } from 'level';
11
11
  import schedule from 'node-schedule';
12
12
  import yaml from 'yaml';
13
13
  import log4js from 'log4js';
14
- export { fs, ws, path, axios, lodash, moment, express, chalk, chokidar, level, schedule, yaml, log4js, };
14
+ import art_template from 'art-template';
15
+ export { fs, ws, path, axios, lodash, moment, express, chalk, chokidar, level, schedule, yaml, log4js, art_template, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",
@@ -42,6 +42,7 @@
42
42
  "cp": "cp ./lib/modules.d.ts ./modules.d.ts && cp ./lib/modules.js ./modules.js",
43
43
  "delete": "pm2 delete ./config/config/pm2.yaml",
44
44
  "dev": "tsx ./lib/index.js --dev",
45
+ "debug": "tsx watch ./lib/index.js --dev",
45
46
  "fix": "eslint lib/**/*.js --fix",
46
47
  "fix:all": "eslint lib/**/*.js --fix && eslint lib/**/*.ts --fix",
47
48
  "init": "node lib/tools/install.js",
@@ -65,7 +66,7 @@
65
66
  "chalk": "5.3.0",
66
67
  "chokidar": "3.6.0",
67
68
  "express": "4.19.2",
68
- "kritor-proto": "^1.0.1",
69
+ "kritor-proto": "^1.0.2",
69
70
  "level": "8.0.1",
70
71
  "lodash": "4.17.21",
71
72
  "log4js": "6.9.1",