@satorijs/adapter-discord 3.2.1 → 3.2.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 CHANGED
@@ -285,10 +285,9 @@ var Sender = class {
285
285
  this.addition = {};
286
286
  }
287
287
  async sendMessage(elements) {
288
- for (const code of elements) {
289
- const { type, attrs, children } = code;
288
+ for (const { type, attrs, children } of elements) {
290
289
  if (type === "text") {
291
- this.buffer += attrs.content.trim();
290
+ this.buffer += attrs.content;
292
291
  } else if (type === "at") {
293
292
  if (attrs.id) {
294
293
  this.buffer += `<@${attrs.id}>`;
@@ -1502,7 +1501,7 @@ var DiscordBot = class extends import_satori4.Bot {
1502
1501
  });
1503
1502
  if (await this.context.serial(session, "before-send", session))
1504
1503
  return;
1505
- if (!(session == null ? void 0 : session.content))
1504
+ if (!session.content)
1506
1505
  return [];
1507
1506
  const sender = new Sender(this, `/channels/${channelId}/messages`);
1508
1507
  const results = await sender.send(session.content);