@satorijs/adapter-discord 3.8.0 → 3.8.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 +4 -4
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1486,14 +1486,14 @@ var DiscordMessageEncoder = class extends import_satori3.MessageEncoder {
|
|
|
1486
1486
|
this.mode = "default";
|
|
1487
1487
|
}
|
|
1488
1488
|
async getUrl() {
|
|
1489
|
-
var _a, _b;
|
|
1490
|
-
const input = this.options.session.discord;
|
|
1489
|
+
var _a, _b, _c, _d;
|
|
1490
|
+
const input = (_b = (_a = this.options) == null ? void 0 : _a.session) == null ? void 0 : _b.discord;
|
|
1491
1491
|
if ((input == null ? void 0 : input.t) === "INTERACTION_CREATE") {
|
|
1492
1492
|
return `/webhooks/${input.d.application_id}/${input.d.token}`;
|
|
1493
|
-
} else if (this.stack[0].type === "forward" && ((
|
|
1493
|
+
} else if (this.stack[0].type === "forward" && ((_c = this.stack[0].channel) == null ? void 0 : _c.id)) {
|
|
1494
1494
|
if (this.stack[1].author.nickname || this.stack[1].author.avatar) {
|
|
1495
1495
|
const webhook = await this.ensureWebhook();
|
|
1496
|
-
return `/webhooks/${webhook.id}/${webhook.token}?wait=true&thread_id=${(
|
|
1496
|
+
return `/webhooks/${webhook.id}/${webhook.token}?wait=true&thread_id=${(_d = this.stack[0].channel) == null ? void 0 : _d.id}`;
|
|
1497
1497
|
} else {
|
|
1498
1498
|
return `/channels/${this.stack[0].channel.id}/messages`;
|
|
1499
1499
|
}
|