@alemonjs/qq-bot 2.1.17 → 2.1.18

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/sends.js +6 -4
  2. package/package.json +1 -1
package/lib/sends.js CHANGED
@@ -17,6 +17,7 @@ const createButtonsData = (rows, startId = 0) => {
17
17
  id++;
18
18
  const typing = options?.type ?? 'command';
19
19
  const typeMap = { command: 2, link: 0, call: 1 };
20
+ const rowData = options?.rawData ?? {};
20
21
  return {
21
22
  id: String(id),
22
23
  render_data: {
@@ -27,14 +28,15 @@ const createButtonsData = (rows, startId = 0) => {
27
28
  action: {
28
29
  type: typeMap[typing],
29
30
  permission: {
30
- type: typeof options.permission?.type === 'undefined' ? 2 : options.permission.type,
31
- specify_user_ids: options.permission.userIds,
32
- specify_role_ids: options.permission.roleIds
31
+ type: typeof options.permission?.type === 'undefined' ? 2 : options?.permission?.type,
32
+ specify_user_ids: options?.permission?.userIds,
33
+ specify_role_ids: options?.permission?.roleIds
33
34
  },
34
35
  unsupport_tips: options?.toolTip ?? '',
35
36
  data: options?.data ?? '',
36
37
  at_bot_show_channel_list: false,
37
- enter: options?.autoEnter ?? false
38
+ enter: options?.autoEnter ?? false,
39
+ ...rowData
38
40
  }
39
41
  };
40
42
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/qq-bot",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "阿柠檬qq-bot平台连接",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",