discord-message-transcript 1.3.1-dev.2.34 → 1.3.1-dev.3.35

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.
@@ -67,14 +67,14 @@ export async function componentsToJson(components, options) {
67
67
  type: JsonComponentType.File,
68
68
  fileName: component.data.name ?? null,
69
69
  size: component.data.size ?? 0,
70
- url: component.file.data.proxy_url ?? component.file.url,
70
+ url: component.file.url,
71
71
  spoiler: component.spoiler,
72
72
  };
73
73
  }
74
74
  case ComponentType.MediaGallery: {
75
75
  const mediaItems = component.items.map(item => {
76
76
  return {
77
- media: { url: item.media.data.proxy_url ?? item.media.url },
77
+ media: { url: item.media.url },
78
78
  spoiler: item.spoiler,
79
79
  };
80
80
  });
@@ -99,7 +99,7 @@ export async function componentsToJson(components, options) {
99
99
  accessoryJson = {
100
100
  type: JsonComponentType.Thumbnail,
101
101
  media: {
102
- url: component.accessory.media.data.proxy_url ?? component.accessory.media.url,
102
+ url: component.accessory.media.url,
103
103
  },
104
104
  spoiler: component.accessory.spoiler,
105
105
  };
@@ -13,7 +13,7 @@ export async function fetchMessages(ctx) {
13
13
  name: attachment.name,
14
14
  size: attachment.size,
15
15
  spoiler: attachment.spoiler,
16
- url: attachment.proxyURL,
16
+ url: attachment.url,
17
17
  };
18
18
  });
19
19
  // This only works because embeds with the type poll_result that are send when a poll end are marked as a message send by the system
@@ -21,13 +21,13 @@ export async function fetchMessages(ctx) {
21
21
  ? []
22
22
  : message.embeds.map(embed => {
23
23
  return {
24
- author: embed.author ? { name: embed.author.name, url: embed.author.url ?? null, iconURL: embed.author.proxyIconURL ?? embed.author?.iconURL ?? null } : null,
24
+ author: embed.author ? { name: embed.author.name, url: embed.author.url ?? null, iconURL: embed.author?.iconURL ?? null } : null,
25
25
  description: embed.description ?? null,
26
26
  fields: embed.fields.map(field => ({ inline: field.inline ?? false, name: field.name, value: field.value })),
27
- footer: embed.footer ? { iconURL: embed.footer.proxyIconURL ?? embed.footer?.iconURL ?? null, text: embed.footer.text } : null,
27
+ footer: embed.footer ? { iconURL: embed.footer?.iconURL ?? null, text: embed.footer.text } : null,
28
28
  hexColor: isValidHexColor(embed.hexColor, true),
29
- image: embed.image?.url ? { url: embed.image.proxyURL ?? embed.image.url } : null,
30
- thumbnail: embed.thumbnail?.url ? { url: embed.thumbnail.proxyURL ?? embed.thumbnail.url } : null,
29
+ image: embed.image?.url ? { url: embed.image.url } : null,
30
+ thumbnail: embed.thumbnail?.url ? { url: embed.thumbnail.url } : null,
31
31
  timestamp: embed.timestamp,
32
32
  title: embed.title,
33
33
  type: embed.data.type ?? "rich",
package/dist/index.js CHANGED
@@ -92,23 +92,21 @@ export async function createTranscript(channel, options = {}) {
92
92
  ...options.cdnOptions
93
93
  };
94
94
  }
95
- if (options.cdnOptions || options.saveImages) {
96
- await Promise.all([
97
- (async () => {
98
- jsonTranscript.setAuthors(await authorUrlResolver(authors, internalOptions, options.cdnOptions ?? null, urlCache));
99
- authors.clear();
100
- })(),
101
- (() => {
102
- jsonTranscript.setMentions({ channels: Array.from(mentions.channels.values()), roles: Array.from(mentions.roles.values()), users: Array.from(mentions.users.values()) });
103
- mentions.channels.clear();
104
- mentions.roles.clear();
105
- mentions.users.clear();
106
- })(),
107
- (async () => {
108
- jsonTranscript.setMessages(await messagesUrlResolver(jsonTranscript.getMessages(), internalOptions, options.cdnOptions ?? null, urlCache));
109
- })()
110
- ]);
111
- }
95
+ await Promise.all([
96
+ (async () => {
97
+ jsonTranscript.setAuthors(await authorUrlResolver(authors, internalOptions, options.cdnOptions ?? null, urlCache));
98
+ authors.clear();
99
+ })(),
100
+ (() => {
101
+ jsonTranscript.setMentions({ channels: Array.from(mentions.channels.values()), roles: Array.from(mentions.roles.values()), users: Array.from(mentions.users.values()) });
102
+ mentions.channels.clear();
103
+ mentions.roles.clear();
104
+ mentions.users.clear();
105
+ })(),
106
+ (async () => {
107
+ jsonTranscript.setMessages(await messagesUrlResolver(jsonTranscript.getMessages(), internalOptions, options.cdnOptions ?? null, urlCache));
108
+ })()
109
+ ]);
112
110
  const outputJson = await jsonTranscript.toJson();
113
111
  urlCache.clear();
114
112
  const result = await output(outputJson);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "discord-message-transcript",
3
- "version": "1.3.1-dev.2.34",
3
+ "version": "1.3.1-dev.3.35",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,7 +48,7 @@
48
48
  "typescript": "^5.9.3"
49
49
  },
50
50
  "dependencies": {
51
- "discord-message-transcript-base": "1.3.1-dev.2.34"
51
+ "discord-message-transcript-base": "1.3.1-dev.3.35"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "discord.js": ">=14.19.0 <15"