@satorijs/adapter-discord 3.3.0 → 3.3.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/bot.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { Bot, Context, Quester, Schema, segment } from '@satorijs/satori';
2
- import { DiscordModulator } from './modulator';
1
+ import { Bot, Context, Fragment, Quester, Schema } from '@satorijs/satori';
2
+ import { DiscordMessenger } from './message';
3
3
  import { Internal } from './types';
4
4
  import { WsClient } from './ws';
5
- export declare class DiscordBot<C extends Context = Context> extends Bot<DiscordBot.Config> {
5
+ export declare class DiscordBot extends Bot<DiscordBot.Config> {
6
6
  http: Quester;
7
7
  internal: Internal;
8
- constructor(ctx: C, config: DiscordBot.Config);
8
+ constructor(ctx: Context, config: DiscordBot.Config);
9
9
  getSelf(): Promise<import("@satorijs/core").Universal.User>;
10
- sendMessage(channelId: string, content: string | segment, guildId?: string): any;
11
- sendPrivateMessage(channelId: string, content: string | segment): Promise<string[]>;
10
+ sendMessage(channelId: string, content: Fragment, guildId?: string): Promise<string[]>;
11
+ sendPrivateMessage(channelId: string, content: Fragment): Promise<string[]>;
12
12
  deleteMessage(channelId: string, messageId: string): Promise<void>;
13
- editMessage(channelId: string, messageId: string, content: string | segment): Promise<void>;
13
+ editMessage(channelId: string, messageId: string, content: Fragment): Promise<void>;
14
14
  getMessage(channelId: string, messageId: string): Promise<import("@satorijs/core").Universal.Message>;
15
15
  getMessageList(channelId: string, before?: string): Promise<import("@satorijs/core").Universal.Message[]>;
16
16
  getUser(userId: string): Promise<import("@satorijs/core").Universal.User>;
@@ -30,7 +30,7 @@ export declare class DiscordBot<C extends Context = Context> extends Bot<Discord
30
30
  getChannelList(guildId: string): Promise<import("@satorijs/core").Universal.Channel[]>;
31
31
  }
32
32
  export declare namespace DiscordBot {
33
- interface Config extends Bot.Config, Quester.Config, DiscordModulator.Config, WsClient.Config {
33
+ interface Config extends Bot.Config, Quester.Config, DiscordMessenger.Config, WsClient.Config {
34
34
  token: string;
35
35
  }
36
36
  const Config: Schema<Config>;
package/lib/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { DiscordBot } from './bot';
2
2
  import * as Discord from './types';
3
3
  export { Discord };
4
4
  export * from './bot';
5
- export * from './modulator';
5
+ export * from './message';
6
6
  export * from './utils';
7
7
  export * from './ws';
8
8
  export default DiscordBot;
package/lib/index.js CHANGED
@@ -23,12 +23,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  ));
24
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
25
 
26
- // adapters/discord/src/index.ts
26
+ // satori/adapters/discord/src/index.ts
27
27
  var src_exports = {};
28
28
  __export(src_exports, {
29
29
  Discord: () => types_exports,
30
30
  DiscordBot: () => DiscordBot,
31
- DiscordModulator: () => DiscordModulator,
31
+ DiscordMessenger: () => DiscordMessenger,
32
32
  WsClient: () => WsClient,
33
33
  adaptAuthor: () => adaptAuthor,
34
34
  adaptChannel: () => adaptChannel,
@@ -41,10 +41,10 @@ __export(src_exports, {
41
41
  });
42
42
  module.exports = __toCommonJS(src_exports);
43
43
 
44
- // adapters/discord/src/bot.ts
44
+ // satori/adapters/discord/src/bot.ts
45
45
  var import_satori4 = require("@satorijs/satori");
46
46
 
47
- // adapters/discord/src/utils.ts
47
+ // satori/adapters/discord/src/utils.ts
48
48
  var import_satori = require("@satorijs/satori");
49
49
  var adaptUser = /* @__PURE__ */ __name((user) => ({
50
50
  userId: user.id,
@@ -67,6 +67,7 @@ var adaptAuthor = /* @__PURE__ */ __name((author) => ({
67
67
  }), "adaptAuthor");
68
68
  async function adaptMessage(bot, meta, session = {}) {
69
69
  var _a, _b, _c;
70
+ const { platform } = bot;
70
71
  prepareMessage(session, meta);
71
72
  session.messageId = meta.id;
72
73
  session.timestamp = new Date(meta.timestamp).valueOf() || Date.now();
@@ -87,14 +88,21 @@ async function adaptMessage(bot, meta, session = {}) {
87
88
  const user = (_a2 = meta.mentions) == null ? void 0 : _a2.find((u) => u.id === id || `${u.username}#${u.discriminator}` === id);
88
89
  return import_satori.segment.at(id, { name: user == null ? void 0 : user.username }).toString();
89
90
  }
90
- }).replace(/<:(.*):(.+?)>/g, (_, name, id) => (0, import_satori.segment)("face", { id, name }).toString()).replace(/<a:(.*):(.+?)>/g, (_, name, id) => (0, import_satori.segment)("face", { id, name, animated: true }).toString()).replace(/@everyone/g, () => (0, import_satori.segment)("at", { type: "all" }).toString()).replace(/@here/g, () => (0, import_satori.segment)("at", { type: "here" }).toString()).replace(/<#(.+?)>/g, (_, id) => {
91
+ }).replace(/<a?:(.*):(.+?)>/g, (_, name, id) => {
92
+ const animated = _[1] === "a";
93
+ return (0, import_satori.segment)("face", { id, name, animated, platform }, [
94
+ import_satori.segment.image(`https://cdn.discordapp.com/emojis/${id}.gif?quality=lossless`)
95
+ ]).toString();
96
+ }).replace(/@everyone/g, () => (0, import_satori.segment)("at", { type: "all" }).toString()).replace(/@here/g, () => (0, import_satori.segment)("at", { type: "here" }).toString()).replace(/<#(.+?)>/g, (_, id) => {
91
97
  var _a2;
92
98
  const channel = (_a2 = meta.mention_channels) == null ? void 0 : _a2.find((c) => c.id === id);
93
99
  return import_satori.segment.sharp(id, { name: channel == null ? void 0 : channel.name }).toString();
94
100
  });
95
101
  }
96
102
  if ((_c = meta.attachments) == null ? void 0 : _c.length) {
97
- session.content += " " + meta.attachments.map((v) => {
103
+ if (session.content)
104
+ session.content += " ";
105
+ session.content += meta.attachments.map((v) => {
98
106
  var _a2, _b2, _c2;
99
107
  if (v.height && v.width && ((_a2 = v.content_type) == null ? void 0 : _a2.startsWith("image/"))) {
100
108
  return (0, import_satori.segment)("image", {
@@ -200,11 +208,11 @@ async function adaptSession(bot, input) {
200
208
  }
201
209
  __name(adaptSession, "adaptSession");
202
210
 
203
- // adapters/discord/src/modulator.ts
211
+ // satori/adapters/discord/src/message.ts
204
212
  var import_satori2 = require("@satorijs/satori");
205
213
  var import_file_type = require("file-type");
206
214
  var import_form_data = __toESM(require("form-data"));
207
- var DiscordModulator = class extends import_satori2.Modulator {
215
+ var DiscordMessenger = class extends import_satori2.Messenger {
208
216
  constructor() {
209
217
  super(...arguments);
210
218
  this.buffer = "";
@@ -324,8 +332,12 @@ var DiscordModulator = class extends import_satori2.Modulator {
324
332
  }
325
333
  } else if (type === "sharp" && attrs.id) {
326
334
  this.buffer += `<#${attrs.id}>`;
327
- } else if (type === "face" && attrs.name && attrs.id) {
328
- this.buffer += `<:${attrs.name}:${attrs.id}>`;
335
+ } else if (type === "face") {
336
+ if (attrs.platform && attrs.platform !== this.bot.platform) {
337
+ return this.render(children);
338
+ } else {
339
+ this.buffer += `<${attrs.animated ? "a" : ""}:${attrs.name}:${attrs.id}>`;
340
+ }
329
341
  } else if ((type === "image" || type === "video") && attrs.url) {
330
342
  if (this.mode === "figure") {
331
343
  this.figure = element;
@@ -376,9 +388,9 @@ var DiscordModulator = class extends import_satori2.Modulator {
376
388
  }
377
389
  }
378
390
  };
379
- __name(DiscordModulator, "DiscordModulator");
380
- ((DiscordModulator2) => {
381
- DiscordModulator2.Config = import_satori2.Schema.object({
391
+ __name(DiscordMessenger, "DiscordMessenger");
392
+ ((DiscordMessenger2) => {
393
+ DiscordMessenger2.Config = import_satori2.Schema.object({
382
394
  handleExternalAsset: import_satori2.Schema.union([
383
395
  import_satori2.Schema.const("download").description("先下载后发送"),
384
396
  import_satori2.Schema.const("direct").description("直接发送链接"),
@@ -390,9 +402,9 @@ __name(DiscordModulator, "DiscordModulator");
390
402
  import_satori2.Schema.const("auto").description("如果图片本身采用直接发送则与前面的文本分开,否则将文本作为图片的附带信息发送")
391
403
  ]).role("radio").description("发送图文等混合内容时采用的方式。").default("auto")
392
404
  }).description("发送设置");
393
- })(DiscordModulator || (DiscordModulator = {}));
405
+ })(DiscordMessenger || (DiscordMessenger = {}));
394
406
 
395
- // adapters/discord/src/types/index.ts
407
+ // satori/adapters/discord/src/types/index.ts
396
408
  var types_exports = {};
397
409
  __export(types_exports, {
398
410
  ActivityFlag: () => ActivityFlag,
@@ -429,7 +441,7 @@ __export(types_exports, {
429
441
  Webhook: () => Webhook2
430
442
  });
431
443
 
432
- // adapters/discord/src/types/internal.ts
444
+ // satori/adapters/discord/src/types/internal.ts
433
445
  var import_cosmokit = require("cosmokit");
434
446
  var Internal = class {
435
447
  constructor(http) {
@@ -469,7 +481,7 @@ var Internal = class {
469
481
  };
470
482
  __name(Internal, "Internal");
471
483
 
472
- // adapters/discord/src/types/application.ts
484
+ // satori/adapters/discord/src/types/application.ts
473
485
  var ApplicationFlag = /* @__PURE__ */ ((ApplicationFlag2) => {
474
486
  ApplicationFlag2[ApplicationFlag2["GATEWAY_PRESENCE"] = 4096] = "GATEWAY_PRESENCE";
475
487
  ApplicationFlag2[ApplicationFlag2["GATEWAY_PRESENCE_LIMITED"] = 8192] = "GATEWAY_PRESENCE_LIMITED";
@@ -488,7 +500,7 @@ Internal.define({
488
500
  }
489
501
  });
490
502
 
491
- // adapters/discord/src/types/audit-log.ts
503
+ // satori/adapters/discord/src/types/audit-log.ts
492
504
  var AuditLog;
493
505
  ((AuditLog2) => {
494
506
  let Type;
@@ -555,7 +567,7 @@ Internal.define({
555
567
  }
556
568
  });
557
569
 
558
- // adapters/discord/src/types/auto-moderation.ts
570
+ // satori/adapters/discord/src/types/auto-moderation.ts
559
571
  var AutoModerationRule;
560
572
  ((AutoModerationRule2) => {
561
573
  let EventType;
@@ -597,7 +609,7 @@ Internal.define({
597
609
  }
598
610
  });
599
611
 
600
- // adapters/discord/src/types/ban.ts
612
+ // satori/adapters/discord/src/types/ban.ts
601
613
  Internal.define({
602
614
  "/guilds/{guild.id}/bans": {
603
615
  GET: "getGuildBans"
@@ -609,7 +621,7 @@ Internal.define({
609
621
  }
610
622
  });
611
623
 
612
- // adapters/discord/src/types/channel.ts
624
+ // satori/adapters/discord/src/types/channel.ts
613
625
  var Channel2;
614
626
  ((Channel10) => {
615
627
  let Type;
@@ -669,7 +681,7 @@ Internal.define({
669
681
  }
670
682
  });
671
683
 
672
- // adapters/discord/src/types/command.ts
684
+ // satori/adapters/discord/src/types/command.ts
673
685
  var ApplicationCommand;
674
686
  ((ApplicationCommand3) => {
675
687
  let Type;
@@ -728,7 +740,7 @@ Internal.define({
728
740
  }
729
741
  });
730
742
 
731
- // adapters/discord/src/types/component.ts
743
+ // satori/adapters/discord/src/types/component.ts
732
744
  var ComponentType = /* @__PURE__ */ ((ComponentType2) => {
733
745
  ComponentType2[ComponentType2["ACTION_ROW"] = 1] = "ACTION_ROW";
734
746
  ComponentType2[ComponentType2["BUTTON"] = 2] = "BUTTON";
@@ -742,7 +754,7 @@ var TextInputStyles = /* @__PURE__ */ ((TextInputStyles2) => {
742
754
  return TextInputStyles2;
743
755
  })(TextInputStyles || {});
744
756
 
745
- // adapters/discord/src/types/device.ts
757
+ // satori/adapters/discord/src/types/device.ts
746
758
  var DeviceType = /* @__PURE__ */ ((DeviceType2) => {
747
759
  DeviceType2["AUDIO_INPUT"] = "audioinput";
748
760
  DeviceType2["AUDIO_OUTPUT"] = "audiooutput";
@@ -750,7 +762,7 @@ var DeviceType = /* @__PURE__ */ ((DeviceType2) => {
750
762
  return DeviceType2;
751
763
  })(DeviceType || {});
752
764
 
753
- // adapters/discord/src/types/emoji.ts
765
+ // satori/adapters/discord/src/types/emoji.ts
754
766
  Internal.define({
755
767
  "/guilds/{guild.id}/emojis": {
756
768
  GET: "listGuildEmojis",
@@ -763,7 +775,7 @@ Internal.define({
763
775
  }
764
776
  });
765
777
 
766
- // adapters/discord/src/types/gateway.ts
778
+ // satori/adapters/discord/src/types/gateway.ts
767
779
  var GatewayOpcode = /* @__PURE__ */ ((GatewayOpcode2) => {
768
780
  GatewayOpcode2[GatewayOpcode2["DISPATCH"] = 0] = "DISPATCH";
769
781
  GatewayOpcode2[GatewayOpcode2["HEARTBEAT"] = 1] = "HEARTBEAT";
@@ -809,7 +821,7 @@ Internal.define({
809
821
  }
810
822
  });
811
823
 
812
- // adapters/discord/src/types/guild-member.ts
824
+ // satori/adapters/discord/src/types/guild-member.ts
813
825
  Internal.define({
814
826
  "/guilds/{guild.id}/members/{user.id}": {
815
827
  GET: "getGuildMember",
@@ -836,7 +848,7 @@ Internal.define({
836
848
  }
837
849
  });
838
850
 
839
- // adapters/discord/src/types/guild-template.ts
851
+ // satori/adapters/discord/src/types/guild-template.ts
840
852
  Internal.define({
841
853
  "/guilds/templates/{template.code}": {
842
854
  GET: "getGuildTemplate",
@@ -853,7 +865,7 @@ Internal.define({
853
865
  }
854
866
  });
855
867
 
856
- // adapters/discord/src/types/guild.ts
868
+ // satori/adapters/discord/src/types/guild.ts
857
869
  var Guild3;
858
870
  ((Guild6) => {
859
871
  let Params;
@@ -938,7 +950,7 @@ Internal.define({
938
950
  }
939
951
  });
940
952
 
941
- // adapters/discord/src/types/integration.ts
953
+ // satori/adapters/discord/src/types/integration.ts
942
954
  var IntegrationExpireBehavior = /* @__PURE__ */ ((IntegrationExpireBehavior2) => {
943
955
  IntegrationExpireBehavior2[IntegrationExpireBehavior2["REMOVE_ROLE"] = 0] = "REMOVE_ROLE";
944
956
  IntegrationExpireBehavior2[IntegrationExpireBehavior2["KICK"] = 1] = "KICK";
@@ -953,7 +965,7 @@ Internal.define({
953
965
  }
954
966
  });
955
967
 
956
- // adapters/discord/src/types/interaction.ts
968
+ // satori/adapters/discord/src/types/interaction.ts
957
969
  var InteractionType = /* @__PURE__ */ ((InteractionType2) => {
958
970
  InteractionType2[InteractionType2["PING"] = 1] = "PING";
959
971
  InteractionType2[InteractionType2["APPLICATION_COMMAND"] = 2] = "APPLICATION_COMMAND";
@@ -993,7 +1005,7 @@ Internal.define({
993
1005
  }
994
1006
  });
995
1007
 
996
- // adapters/discord/src/types/invite.ts
1008
+ // satori/adapters/discord/src/types/invite.ts
997
1009
  var Invite;
998
1010
  ((Invite2) => {
999
1011
  let TargetType;
@@ -1019,7 +1031,7 @@ Internal.define({
1019
1031
  }
1020
1032
  });
1021
1033
 
1022
- // adapters/discord/src/types/message.ts
1034
+ // satori/adapters/discord/src/types/message.ts
1023
1035
  var Message2;
1024
1036
  ((Message4) => {
1025
1037
  let Type;
@@ -1092,7 +1104,7 @@ Internal.define({
1092
1104
  }
1093
1105
  });
1094
1106
 
1095
- // adapters/discord/src/types/presence.ts
1107
+ // satori/adapters/discord/src/types/presence.ts
1096
1108
  var StatusType2 = /* @__PURE__ */ ((StatusType3) => {
1097
1109
  StatusType3["ONLINE"] = "ONLINE";
1098
1110
  StatusType3["DND"] = "DND";
@@ -1120,7 +1132,7 @@ var ActivityFlag = /* @__PURE__ */ ((ActivityFlag2) => {
1120
1132
  return ActivityFlag2;
1121
1133
  })(ActivityFlag || {});
1122
1134
 
1123
- // adapters/discord/src/types/reaction.ts
1135
+ // satori/adapters/discord/src/types/reaction.ts
1124
1136
  Internal.define({
1125
1137
  "/channels/{channel.id}/messages/{message.id}/reactions/{emoji}/@me": {
1126
1138
  PUT: "createReaction",
@@ -1138,7 +1150,7 @@ Internal.define({
1138
1150
  }
1139
1151
  });
1140
1152
 
1141
- // adapters/discord/src/types/role.ts
1153
+ // satori/adapters/discord/src/types/role.ts
1142
1154
  var Permission = /* @__PURE__ */ ((Permission2) => {
1143
1155
  Permission2[Permission2["CREATE_INSTANT_INVITE"] = 1] = "CREATE_INSTANT_INVITE";
1144
1156
  Permission2[Permission2["KICK_MEMBERS"] = 2] = "KICK_MEMBERS";
@@ -1193,7 +1205,7 @@ Internal.define({
1193
1205
  }
1194
1206
  });
1195
1207
 
1196
- // adapters/discord/src/types/scheduled-event.ts
1208
+ // satori/adapters/discord/src/types/scheduled-event.ts
1197
1209
  var GuildScheduledEvent;
1198
1210
  ((GuildScheduledEvent2) => {
1199
1211
  let PrivacyLevel;
@@ -1229,7 +1241,7 @@ Internal.define({
1229
1241
  }
1230
1242
  });
1231
1243
 
1232
- // adapters/discord/src/types/stage-instance.ts
1244
+ // satori/adapters/discord/src/types/stage-instance.ts
1233
1245
  Internal.define({
1234
1246
  "/stage-instances": {
1235
1247
  POST: "createStageInstance"
@@ -1241,7 +1253,7 @@ Internal.define({
1241
1253
  }
1242
1254
  });
1243
1255
 
1244
- // adapters/discord/src/types/sticker.ts
1256
+ // satori/adapters/discord/src/types/sticker.ts
1245
1257
  var Sticker3;
1246
1258
  ((Sticker4) => {
1247
1259
  let Type;
@@ -1274,14 +1286,14 @@ Internal.define({
1274
1286
  }
1275
1287
  });
1276
1288
 
1277
- // adapters/discord/src/types/team.ts
1289
+ // satori/adapters/discord/src/types/team.ts
1278
1290
  var MembershipState = /* @__PURE__ */ ((MembershipState2) => {
1279
1291
  MembershipState2[MembershipState2["INVITED"] = 1] = "INVITED";
1280
1292
  MembershipState2[MembershipState2["ACCEPTED"] = 2] = "ACCEPTED";
1281
1293
  return MembershipState2;
1282
1294
  })(MembershipState || {});
1283
1295
 
1284
- // adapters/discord/src/types/thread.ts
1296
+ // satori/adapters/discord/src/types/thread.ts
1285
1297
  Internal.define({
1286
1298
  "/guilds/{guild.id}/threads/active": {
1287
1299
  GET: "listActiveGuildThreads"
@@ -1318,7 +1330,7 @@ Internal.define({
1318
1330
  }
1319
1331
  });
1320
1332
 
1321
- // adapters/discord/src/types/user.ts
1333
+ // satori/adapters/discord/src/types/user.ts
1322
1334
  var UserFlag = /* @__PURE__ */ ((UserFlag2) => {
1323
1335
  UserFlag2[UserFlag2["NONE"] = 0] = "NONE";
1324
1336
  UserFlag2[UserFlag2["DISCORD_EMPLOYEE"] = 1] = "DISCORD_EMPLOYEE";
@@ -1354,7 +1366,7 @@ Internal.define({
1354
1366
  }
1355
1367
  });
1356
1368
 
1357
- // adapters/discord/src/types/voice.ts
1369
+ // satori/adapters/discord/src/types/voice.ts
1358
1370
  Internal.define({
1359
1371
  "/voice/regions": {
1360
1372
  GET: "listVoiceRegions"
@@ -1370,7 +1382,7 @@ Internal.define({
1370
1382
  }
1371
1383
  });
1372
1384
 
1373
- // adapters/discord/src/types/webhook.ts
1385
+ // satori/adapters/discord/src/types/webhook.ts
1374
1386
  var Webhook2;
1375
1387
  ((Webhook3) => {
1376
1388
  let Type;
@@ -1412,7 +1424,7 @@ Internal.define({
1412
1424
  }
1413
1425
  });
1414
1426
 
1415
- // adapters/discord/src/ws.ts
1427
+ // satori/adapters/discord/src/ws.ts
1416
1428
  var import_satori3 = require("@satorijs/satori");
1417
1429
  var logger = new import_satori3.Logger("discord");
1418
1430
  var WsClient = class extends import_satori3.Adapter.WsClient {
@@ -1500,7 +1512,7 @@ __name(WsClient, "WsClient");
1500
1512
  ]);
1501
1513
  })(WsClient || (WsClient = {}));
1502
1514
 
1503
- // adapters/discord/src/bot.ts
1515
+ // satori/adapters/discord/src/bot.ts
1504
1516
  var DiscordBot = class extends import_satori4.Bot {
1505
1517
  constructor(ctx, config) {
1506
1518
  super(ctx, config);
@@ -1519,19 +1531,18 @@ var DiscordBot = class extends import_satori4.Bot {
1519
1531
  return adaptUser(data);
1520
1532
  }
1521
1533
  async sendMessage(channelId, content, guildId) {
1522
- return new DiscordModulator(this, channelId, guildId).send(content);
1534
+ return new DiscordMessenger(this, channelId, guildId).send(content);
1523
1535
  }
1524
1536
  async sendPrivateMessage(channelId, content) {
1525
- return new DiscordModulator(this, channelId).send(content);
1537
+ return new DiscordMessenger(this, channelId).send(content);
1526
1538
  }
1527
1539
  async deleteMessage(channelId, messageId) {
1528
1540
  await this.internal.deleteMessage(channelId, messageId);
1529
1541
  }
1530
1542
  async editMessage(channelId, messageId, content) {
1531
- const fragment = import_satori4.segment.normalize(content);
1532
- content = fragment.toString();
1533
- const chain = fragment.children;
1534
- const image = chain.find((v) => v.type === "image");
1543
+ const elements = import_satori4.segment.normalize(content);
1544
+ content = elements.toString();
1545
+ const image = elements.find((v) => v.type === "image");
1535
1546
  if (image) {
1536
1547
  throw new Error("You can't include embed object(s) while editing message.");
1537
1548
  }
@@ -1589,19 +1600,19 @@ __name(DiscordBot, "DiscordBot");
1589
1600
  token: import_satori4.Schema.string().description("机器人的用户令牌。").role("secret").required()
1590
1601
  }),
1591
1602
  WsClient.Config,
1592
- DiscordModulator.Config,
1603
+ DiscordMessenger.Config,
1593
1604
  import_satori4.Quester.createConfig("https://discord.com/api/v10")
1594
1605
  ]);
1595
1606
  })(DiscordBot || (DiscordBot = {}));
1596
1607
  DiscordBot.prototype.platform = "discord";
1597
1608
 
1598
- // adapters/discord/src/index.ts
1609
+ // satori/adapters/discord/src/index.ts
1599
1610
  var src_default = DiscordBot;
1600
1611
  // Annotate the CommonJS export names for ESM import in node:
1601
1612
  0 && (module.exports = {
1602
1613
  Discord,
1603
1614
  DiscordBot,
1604
- DiscordModulator,
1615
+ DiscordMessenger,
1605
1616
  WsClient,
1606
1617
  adaptAuthor,
1607
1618
  adaptChannel,