@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.
- package/lib/sends.js +3 -4
- 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.
|
|
94
|
+
'MD.image': (value, options) => `\n\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
|
}
|