@alemonjs/qq-bot 2.1.0-alpha.22 → 2.1.0-alpha.23

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 +3 -4
  2. package/package.json +1 -1
package/lib/sends.js CHANGED
@@ -91,7 +91,8 @@ const mdFormatters = {
91
91
  'MD.blockquote': value => `\n> ${value}`,
92
92
  'MD.newline': () => '\n',
93
93
  'MD.link': value => `[🔗${value.text}](${value.url}) `,
94
- 'MD.at': (value, options) => {
94
+ 'MD.image': (value, options) => `\n![text #${options?.width || 208}px #${options?.height || 320}px](${value})\n`,
95
+ 'MD.mention': (value, options) => {
95
96
  const { belong } = options || {};
96
97
  if (belong === 'channel') {
97
98
  return '';
@@ -121,9 +122,7 @@ const createMarkdownText = (data) => {
121
122
  }
122
123
  if (mdItem.type === 'MD.list' && typeof mdItem.value !== 'string') {
123
124
  const listStr = mdItem.value.map(listItem => {
124
- return typeof listItem.value === 'object'
125
- ? `\n${listItem.value.index}. ${listItem.value.text}`
126
- : `\n- ${listItem.value}`;
125
+ return typeof listItem.value === 'object' ? `\n${listItem.value.index}. ${listItem.value.text}` : `\n- ${listItem.value}`;
127
126
  });
128
127
  return `${listStr}\n`;
129
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/qq-bot",
3
- "version": "2.1.0-alpha.22",
3
+ "version": "2.1.0-alpha.23",
4
4
  "description": "阿柠檬qq-bot平台连接",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",