@satorijs/adapter-discord 3.9.0 → 3.9.2
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 +4 -2
- package/lib/index.js.map +2 -2
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1648,10 +1648,14 @@ var _DiscordMessageEncoder = class _DiscordMessageEncoder extends import_satori3
|
|
|
1648
1648
|
} else {
|
|
1649
1649
|
this.buffer += ` (<${attrs.href}>) `;
|
|
1650
1650
|
}
|
|
1651
|
+
} else if (type === "br") {
|
|
1652
|
+
this.buffer += "\n";
|
|
1651
1653
|
} else if (type === "p") {
|
|
1652
1654
|
if (!this.buffer.endsWith("\n"))
|
|
1653
1655
|
this.buffer += "\n";
|
|
1654
1656
|
await this.render(children);
|
|
1657
|
+
if (!this.buffer.endsWith("\n"))
|
|
1658
|
+
this.buffer += "\n";
|
|
1655
1659
|
this.buffer += "\n";
|
|
1656
1660
|
} else if (type === "blockquote") {
|
|
1657
1661
|
if (!this.buffer.endsWith("\n"))
|
|
@@ -1876,7 +1880,6 @@ var _WsClient = class _WsClient extends import_satori4.Adapter.WsClient {
|
|
|
1876
1880
|
return;
|
|
1877
1881
|
this._sessionId = "";
|
|
1878
1882
|
logger2.warn("offline: invalid session");
|
|
1879
|
-
this.bot.offline();
|
|
1880
1883
|
(_a = this.bot.socket) == null ? void 0 : _a.close();
|
|
1881
1884
|
}
|
|
1882
1885
|
if (parsed.op === Gateway.Opcode.DISPATCH) {
|
|
@@ -1897,7 +1900,6 @@ var _WsClient = class _WsClient extends import_satori4.Adapter.WsClient {
|
|
|
1897
1900
|
this.bot.dispatch(session);
|
|
1898
1901
|
}
|
|
1899
1902
|
if (parsed.op === Gateway.Opcode.RECONNECT) {
|
|
1900
|
-
this.bot.offline();
|
|
1901
1903
|
logger2.warn("offline: discord request reconnect");
|
|
1902
1904
|
(_b = this.bot.socket) == null ? void 0 : _b.close();
|
|
1903
1905
|
}
|