@satorijs/adapter-discord 3.4.4 → 3.5.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.
- package/lib/index.js +9 -1
- package/lib/index.js.map +2 -2
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -318,7 +322,11 @@ var DiscordMessenger = class extends import_satori2.Messenger {
|
|
|
318
322
|
this.buffer += "`";
|
|
319
323
|
} else if (type === "a") {
|
|
320
324
|
await this.render(children);
|
|
321
|
-
|
|
325
|
+
if (this.options.linkPreview) {
|
|
326
|
+
this.buffer += ` (${attrs.href}) `;
|
|
327
|
+
} else {
|
|
328
|
+
this.buffer += ` (<${attrs.href}>) `;
|
|
329
|
+
}
|
|
322
330
|
} else if (type === "p") {
|
|
323
331
|
await this.render(children);
|
|
324
332
|
this.buffer += "\n";
|