discord-message-transcript 1.3.1-dev.3.35 → 1.3.2-dev.0.49
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/dist/core/assetResolver/base64/imageToBase64.d.ts +2 -0
- package/dist/core/{imageToBase64.js → assetResolver/base64/imageToBase64.js} +18 -4
- package/dist/core/assetResolver/cdn/cdnCustomError.d.ts +16 -0
- package/dist/core/assetResolver/cdn/cdnCustomError.js +28 -0
- package/dist/core/assetResolver/cdn/cdnResolver.d.ts +3 -0
- package/dist/core/assetResolver/cdn/cdnResolver.js +90 -0
- package/dist/core/assetResolver/cdn/cloudinaryCdnResolver.d.ts +1 -0
- package/dist/core/assetResolver/cdn/cloudinaryCdnResolver.js +120 -0
- package/dist/core/assetResolver/cdn/sanitizeFileName.d.ts +1 -0
- package/dist/core/assetResolver/cdn/sanitizeFileName.js +17 -0
- package/dist/core/assetResolver/cdn/uploadCareCdnResolver.d.ts +1 -0
- package/dist/core/assetResolver/cdn/uploadCareCdnResolver.js +137 -0
- package/dist/core/assetResolver/cdn/validateCdnUrl.d.ts +1 -0
- package/dist/core/assetResolver/cdn/validateCdnUrl.js +8 -0
- package/dist/core/assetResolver/contants.d.ts +1 -0
- package/dist/core/assetResolver/contants.js +1 -0
- package/dist/core/assetResolver/index.d.ts +7 -0
- package/dist/core/assetResolver/index.js +22 -0
- package/dist/core/assetResolver/url/authorUrlResolver.d.ts +3 -0
- package/dist/core/assetResolver/url/authorUrlResolver.js +10 -0
- package/dist/core/assetResolver/url/imageUrlResolver.d.ts +4 -0
- package/dist/core/assetResolver/url/imageUrlResolver.js +20 -0
- package/dist/core/assetResolver/url/messageUrlResolver.d.ts +3 -0
- package/dist/core/{urlResolver.js → assetResolver/url/messageUrlResolver.js} +17 -43
- package/dist/core/assetResolver/url/urlResolver.d.ts +3 -0
- package/dist/core/assetResolver/url/urlResolver.js +24 -0
- package/dist/core/{componentToJson.d.ts → discordParser/componentToJson.d.ts} +1 -1
- package/dist/core/discordParser/componentToJson.js +159 -0
- package/dist/core/discordParser/fetchMessages.d.ts +7 -0
- package/dist/core/{fetchMessages.js → discordParser/fetchMessages.js} +1 -1
- package/dist/core/{getMentions.d.ts → discordParser/getMentions.d.ts} +1 -1
- package/dist/core/{getMentions.js → discordParser/getMentions.js} +1 -1
- package/dist/core/discordParser/index.d.ts +4 -0
- package/dist/core/discordParser/index.js +33 -0
- package/dist/core/mappers.d.ts +1 -1
- package/dist/core/mappers.js +1 -1
- package/dist/core/networkSecurity/constants.d.ts +3 -0
- package/dist/core/networkSecurity/constants.js +3 -0
- package/dist/core/networkSecurity/dns.d.ts +2 -0
- package/dist/core/networkSecurity/dns.js +29 -0
- package/dist/core/networkSecurity/index.d.ts +2 -0
- package/dist/core/networkSecurity/index.js +2 -0
- package/dist/core/networkSecurity/ip.d.ts +1 -0
- package/dist/core/networkSecurity/ip.js +110 -0
- package/dist/core/networkSecurity/lookup.d.ts +2 -0
- package/dist/core/networkSecurity/lookup.js +14 -0
- package/dist/core/networkSecurity/urlSafety.d.ts +3 -0
- package/dist/core/networkSecurity/urlSafety.js +71 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +13 -56
- package/dist/renderers/json/json.d.ts +1 -1
- package/dist/renderers/json/json.js +3 -4
- package/dist/types/types.d.ts +36 -2
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/sleep.js +3 -0
- package/package.json +4 -7
- package/dist/core/cdnResolver.d.ts +0 -5
- package/dist/core/cdnResolver.js +0 -210
- package/dist/core/clientManager.d.ts +0 -3
- package/dist/core/clientManager.js +0 -9
- package/dist/core/componentHelpers.d.ts +0 -3
- package/dist/core/componentHelpers.js +0 -175
- package/dist/core/componentToJson.js +0 -145
- package/dist/core/error.d.ts +0 -3
- package/dist/core/error.js +0 -7
- package/dist/core/fetchMessages.d.ts +0 -19
- package/dist/core/imageToBase64.d.ts +0 -1
- package/dist/core/markdown.d.ts +0 -2
- package/dist/core/markdown.js +0 -175
- package/dist/core/urlResolver.d.ts +0 -5
- package/dist/renderers/html/clientRenderer.d.ts +0 -0
- package/dist/renderers/html/clientRenderer.js +0 -73
- package/dist/renderers/html/css.d.ts +0 -11
- package/dist/renderers/html/css.js +0 -663
- package/dist/renderers/html/html copy.d.ts +0 -19
- package/dist/renderers/html/html copy.js +0 -371
- package/dist/renderers/html/html-backup.d.ts +0 -19
- package/dist/renderers/html/html-backup.js +0 -371
- package/dist/renderers/html/html.d.ts +0 -19
- package/dist/renderers/html/html.js +0 -415
- package/dist/renderers/html/html2.d.ts +0 -8
- package/dist/renderers/html/html2.js +0 -233
- package/dist/renderers/html/js.d.ts +0 -4
- package/dist/renderers/html/js.js +0 -174
- package/dist/types/types copy.d.ts +0 -284
- package/dist/types/types copy.js +0 -35
- /package/dist/core/{limiter.d.ts → assetResolver/limiter.d.ts} +0 -0
- /package/dist/core/{limiter.js → assetResolver/limiter.js} +0 -0
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
export function script(options) {
|
|
2
|
-
return `
|
|
3
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
4
|
-
const transcriptDataElement = document.getElementById('authorData');
|
|
5
|
-
if (!transcriptDataElement) {
|
|
6
|
-
console.error('Missing author data element.');
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const data = JSON.parse(transcriptDataElement.textContent);
|
|
11
|
-
const authorMap = new Map((data.authors || []).map(author => [author.id, author]));
|
|
12
|
-
|
|
13
|
-
document.querySelectorAll('.messageDiv[data-author-id]').forEach(messageDiv => {
|
|
14
|
-
const authorId = messageDiv.dataset.authorId;
|
|
15
|
-
const author = authorMap.get(authorId);
|
|
16
|
-
|
|
17
|
-
if (!author) return;
|
|
18
|
-
|
|
19
|
-
const avatarImg = messageDiv.querySelector('.messageImg');
|
|
20
|
-
if (avatarImg) avatarImg.src = author.avatarURL;
|
|
21
|
-
|
|
22
|
-
const username = messageDiv.querySelector('.messageUsername');
|
|
23
|
-
if (username) {
|
|
24
|
-
username.textContent = author.member?.displayName ?? author.displayName;
|
|
25
|
-
username.style.color = author.member?.displayHexColor ?? '#dbdee1';
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const badgesDiv = messageDiv.querySelector('.badges');
|
|
29
|
-
if (badgesDiv) {
|
|
30
|
-
badgesDiv.innerHTML = '';
|
|
31
|
-
if (author.bot) {
|
|
32
|
-
const badge = document.createElement('p');
|
|
33
|
-
badge.className = 'badge';
|
|
34
|
-
badge.textContent = 'APP';
|
|
35
|
-
badgesDiv.appendChild(badge);
|
|
36
|
-
}
|
|
37
|
-
if (author.system) {
|
|
38
|
-
const badge = document.createElement('p');
|
|
39
|
-
badge.className = 'badge';
|
|
40
|
-
badge.textContent = 'SYSTEM';
|
|
41
|
-
badgesDiv.appendChild(badge);
|
|
42
|
-
}
|
|
43
|
-
if (author.guildTag) {
|
|
44
|
-
const badge = document.createElement('p');
|
|
45
|
-
badge.className = 'badgeTag';
|
|
46
|
-
badge.textContent = author.guildTag;
|
|
47
|
-
badgesDiv.appendChild(badge);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
document.querySelectorAll('.messageReply[data-id]').forEach(replyDiv => {
|
|
53
|
-
const repliedToId = replyDiv.dataset.id;
|
|
54
|
-
if (!repliedToId) return;
|
|
55
|
-
|
|
56
|
-
const repliedToMessageDiv = document.getElementById(repliedToId);
|
|
57
|
-
if (!repliedToMessageDiv) return;
|
|
58
|
-
|
|
59
|
-
const repliedToAuthorId = repliedToMessageDiv.dataset.authorId;
|
|
60
|
-
const repliedToAuthor = authorMap.get(repliedToAuthorId);
|
|
61
|
-
|
|
62
|
-
if (repliedToAuthor) {
|
|
63
|
-
const replyImg = replyDiv.querySelector('.messageReplyImg');
|
|
64
|
-
if (replyImg) replyImg.src = repliedToAuthor.avatarURL;
|
|
65
|
-
|
|
66
|
-
const replyBadgesDiv = replyDiv.querySelector('.replyBadges');
|
|
67
|
-
if (replyBadgesDiv) {
|
|
68
|
-
replyBadgesDiv.innerHTML = '';
|
|
69
|
-
if (repliedToAuthor.bot) {
|
|
70
|
-
const badge = document.createElement('p');
|
|
71
|
-
badge.className = 'badge';
|
|
72
|
-
badge.textContent = 'APP';
|
|
73
|
-
replyBadgesDiv.appendChild(badge);
|
|
74
|
-
}
|
|
75
|
-
if (repliedToAuthor.system) {
|
|
76
|
-
const badge = document.createElement('p');
|
|
77
|
-
badge.className = 'badge';
|
|
78
|
-
badge.textContent = 'SYSTEM';
|
|
79
|
-
replyBadgesDiv.appendChild(badge);
|
|
80
|
-
}
|
|
81
|
-
if (repliedToAuthor.guildTag) {
|
|
82
|
-
const badge = document.createElement('p');
|
|
83
|
-
badge.className = 'badgeTag';
|
|
84
|
-
badge.textContent = repliedToAuthor.guildTag;
|
|
85
|
-
replyBadgesDiv.appendChild(badge);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const replyTextDiv = replyDiv.querySelector('.messageReplyText');
|
|
91
|
-
if (replyTextDiv) {
|
|
92
|
-
const originalContent = repliedToMessageDiv.querySelector('.messageContent');
|
|
93
|
-
if (originalContent) {
|
|
94
|
-
let content = originalContent.textContent || '';
|
|
95
|
-
if (content.length > 100) {
|
|
96
|
-
content = content.substring(0, 100).trim() + '...';
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const authorName = repliedToAuthor?.member?.displayName ?? repliedToAuthor?.displayName ?? 'Unknown';
|
|
100
|
-
const authorColor = repliedToAuthor?.member?.displayHexColor ?? 'inherit';
|
|
101
|
-
|
|
102
|
-
const authorNameSpan = \`<span style="color: \${authorColor};">\${authorName}</span>\`;
|
|
103
|
-
replyTextDiv.innerHTML = authorNameSpan + " " + content;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
document.addEventListener('click', function (event) {
|
|
109
|
-
const spoiler = event.target.closest('.spoilerMsg, .spoilerAttachment');
|
|
110
|
-
if (spoiler && !spoiler.classList.contains('revealed')) {
|
|
111
|
-
event.preventDefault();
|
|
112
|
-
event.stopPropagation();
|
|
113
|
-
spoiler.classList.add('revealed');
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const replyDiv = event.target.closest('.messageReply');
|
|
117
|
-
if (replyDiv) {
|
|
118
|
-
event.preventDefault();
|
|
119
|
-
const messageId = replyDiv.dataset.id;
|
|
120
|
-
if (!messageId) return;
|
|
121
|
-
|
|
122
|
-
const message = document.getElementById(messageId);
|
|
123
|
-
if (message) {
|
|
124
|
-
message.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
125
|
-
message.classList.add('highlight');
|
|
126
|
-
setTimeout(() => {
|
|
127
|
-
message.classList.remove('highlight');
|
|
128
|
-
}, 1500);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
${options.includeComponents ? SELECTOR_JS : ""}
|
|
133
|
-
|
|
134
|
-
${options.includePolls ? POLL_JS : ""}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
if (window.hljs) {
|
|
138
|
-
hljs.highlightAll();
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
`;
|
|
142
|
-
}
|
|
143
|
-
export const POLL_JS = `
|
|
144
|
-
const pollDiv = event.target.closest('.pollResultEmbedButton');
|
|
145
|
-
if (pollDiv) {
|
|
146
|
-
event.preventDefault();
|
|
147
|
-
const messageId = pollDiv.dataset.id;
|
|
148
|
-
if (!messageId || messageId == "") return;
|
|
149
|
-
const message = document.getElementById(messageId);
|
|
150
|
-
|
|
151
|
-
if (message) {
|
|
152
|
-
message.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
153
|
-
message.classList.add('highlight');
|
|
154
|
-
setTimeout(() => {
|
|
155
|
-
message.classList.remove('highlight');
|
|
156
|
-
}, 1500);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
`;
|
|
160
|
-
export const SELECTOR_JS = `
|
|
161
|
-
const selectorInput = event.target.closest('.selectorInput');
|
|
162
|
-
document.querySelectorAll('.selector').forEach(selector => {
|
|
163
|
-
if (!selector.contains(event.target)) {
|
|
164
|
-
selector.classList.remove('active');
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
if (selectorInput) {
|
|
169
|
-
const selector = selectorInput.closest('.selector');
|
|
170
|
-
if (selector) {
|
|
171
|
-
selector.classList.toggle('active');
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
`;
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
export type ReturnFormat = "HTML" | "JSON";
|
|
2
|
-
export type ReturnType = "string" | "attachment" | "uploadable" | "stream" | "buffer";
|
|
3
|
-
export type StyleTimeStampKey = "t" | "T" | "d" | "D" | "f" | "F";
|
|
4
|
-
export interface CreateTranscriptOptions {
|
|
5
|
-
fileName?: string;
|
|
6
|
-
includeAttachments?: boolean;
|
|
7
|
-
includeButtons?: boolean;
|
|
8
|
-
includeComponents?: boolean;
|
|
9
|
-
includeEmpty?: boolean;
|
|
10
|
-
includeEmbeds?: boolean;
|
|
11
|
-
includePolls?: boolean;
|
|
12
|
-
includeReactions?: boolean;
|
|
13
|
-
includeV2Components?: boolean;
|
|
14
|
-
localDate?: Locale;
|
|
15
|
-
quantity?: number;
|
|
16
|
-
returnFormat?: ReturnFormat;
|
|
17
|
-
returnType?: ReturnType;
|
|
18
|
-
saveImages?: boolean;
|
|
19
|
-
timeZone?: TimeZone;
|
|
20
|
-
}
|
|
21
|
-
export interface TranscriptOptions {
|
|
22
|
-
fileName: string;
|
|
23
|
-
includeAttachments: boolean;
|
|
24
|
-
includeButtons: boolean;
|
|
25
|
-
includeComponents: boolean;
|
|
26
|
-
includeEmpty: boolean;
|
|
27
|
-
includeEmbeds: boolean;
|
|
28
|
-
includePolls: boolean;
|
|
29
|
-
includeReactions: boolean;
|
|
30
|
-
includeV2Components: boolean;
|
|
31
|
-
localDate: Locale;
|
|
32
|
-
quantity: number;
|
|
33
|
-
returnFormat: ReturnFormat;
|
|
34
|
-
returnType: ReturnType;
|
|
35
|
-
saveImages: boolean;
|
|
36
|
-
timeZone: TimeZone;
|
|
37
|
-
}
|
|
38
|
-
export interface Uploadable {
|
|
39
|
-
content: string;
|
|
40
|
-
contentType: "application/json" | "text/html";
|
|
41
|
-
fileName: string;
|
|
42
|
-
}
|
|
43
|
-
export interface JsonMessage {
|
|
44
|
-
attachments: JsonAttachment[];
|
|
45
|
-
authorId: string;
|
|
46
|
-
components: JsonTopLevelComponent[];
|
|
47
|
-
content: string;
|
|
48
|
-
createdTimestamp: number;
|
|
49
|
-
embeds: JsonEmbed[];
|
|
50
|
-
id: string;
|
|
51
|
-
mentions: JsonMessageMentions;
|
|
52
|
-
poll: JsonPoll | null;
|
|
53
|
-
reactions: JsonReaction[];
|
|
54
|
-
references: {
|
|
55
|
-
messageId: string | null;
|
|
56
|
-
} | null;
|
|
57
|
-
system: boolean;
|
|
58
|
-
}
|
|
59
|
-
export interface JsonReaction {
|
|
60
|
-
count: number;
|
|
61
|
-
emoji: string;
|
|
62
|
-
}
|
|
63
|
-
export interface JsonPoll {
|
|
64
|
-
answers: JsonPollAnswer[];
|
|
65
|
-
expiry: number | null;
|
|
66
|
-
isFinalized: boolean;
|
|
67
|
-
question: string;
|
|
68
|
-
}
|
|
69
|
-
export interface JsonPollAnswer {
|
|
70
|
-
count: number;
|
|
71
|
-
emoji: {
|
|
72
|
-
id: string | null;
|
|
73
|
-
name: string | null;
|
|
74
|
-
animated: boolean;
|
|
75
|
-
} | null;
|
|
76
|
-
id: number;
|
|
77
|
-
text: string;
|
|
78
|
-
}
|
|
79
|
-
export interface JsonAttachment {
|
|
80
|
-
contentType: string | null;
|
|
81
|
-
name: string;
|
|
82
|
-
size: number;
|
|
83
|
-
spoiler: boolean;
|
|
84
|
-
url: string;
|
|
85
|
-
}
|
|
86
|
-
export interface JsonEmbed {
|
|
87
|
-
author: {
|
|
88
|
-
name: string;
|
|
89
|
-
url: string | null;
|
|
90
|
-
iconURL: string | null;
|
|
91
|
-
} | null;
|
|
92
|
-
description: string | null;
|
|
93
|
-
fields: {
|
|
94
|
-
inline: boolean | null;
|
|
95
|
-
name: string;
|
|
96
|
-
value: string;
|
|
97
|
-
}[];
|
|
98
|
-
footer: {
|
|
99
|
-
iconURL: string | null;
|
|
100
|
-
text: string;
|
|
101
|
-
} | null;
|
|
102
|
-
hexColor: string | null;
|
|
103
|
-
image: {
|
|
104
|
-
url: string;
|
|
105
|
-
} | null;
|
|
106
|
-
thumbnail: {
|
|
107
|
-
url: string;
|
|
108
|
-
} | null;
|
|
109
|
-
timestamp: string | null;
|
|
110
|
-
title: string | null;
|
|
111
|
-
type: string;
|
|
112
|
-
url: string | null;
|
|
113
|
-
}
|
|
114
|
-
export interface JsonMessageMentions {
|
|
115
|
-
channels: {
|
|
116
|
-
id: string;
|
|
117
|
-
name: string | null;
|
|
118
|
-
}[];
|
|
119
|
-
everyone: boolean;
|
|
120
|
-
roles: {
|
|
121
|
-
id: string;
|
|
122
|
-
name: string;
|
|
123
|
-
color: string;
|
|
124
|
-
}[];
|
|
125
|
-
users: {
|
|
126
|
-
id: string;
|
|
127
|
-
name: string;
|
|
128
|
-
color: string | null;
|
|
129
|
-
}[];
|
|
130
|
-
}
|
|
131
|
-
export type JsonTopLevelComponent = JsonActionRow | JsonButtonComponent | JsonSelectMenu | JsonV2Component;
|
|
132
|
-
export interface JsonActionRow {
|
|
133
|
-
components: (JsonButtonComponent | JsonSelectMenu)[];
|
|
134
|
-
type: JsonComponentType.ActionRow;
|
|
135
|
-
}
|
|
136
|
-
export interface JsonButtonComponent {
|
|
137
|
-
disabled: boolean;
|
|
138
|
-
emoji: {
|
|
139
|
-
id: string | null;
|
|
140
|
-
name: string | null;
|
|
141
|
-
animated: boolean;
|
|
142
|
-
} | null;
|
|
143
|
-
label: string | null;
|
|
144
|
-
style: JsonButtonStyle;
|
|
145
|
-
type: JsonComponentType.Button;
|
|
146
|
-
url: string | null;
|
|
147
|
-
}
|
|
148
|
-
export type JsonSelectMenu = JsonSelectMenuOthers | JsonSelectMenuString;
|
|
149
|
-
interface JsonSelectMenuOthers {
|
|
150
|
-
disabled: boolean;
|
|
151
|
-
placeholder: string | null;
|
|
152
|
-
type: JsonComponentType.UserSelect | JsonComponentType.RoleSelect | JsonComponentType.MentionableSelect | JsonComponentType.ChannelSelect;
|
|
153
|
-
}
|
|
154
|
-
interface JsonSelectMenuString {
|
|
155
|
-
disabled: boolean;
|
|
156
|
-
options: JsonSelectOption[];
|
|
157
|
-
placeholder: string | null;
|
|
158
|
-
type: JsonComponentType.StringSelect;
|
|
159
|
-
}
|
|
160
|
-
export interface JsonSelectOption {
|
|
161
|
-
description: string | null;
|
|
162
|
-
emoji: {
|
|
163
|
-
id: string | null;
|
|
164
|
-
name: string | null;
|
|
165
|
-
animated: boolean;
|
|
166
|
-
} | null;
|
|
167
|
-
label: string;
|
|
168
|
-
}
|
|
169
|
-
export type JsonV2Component = JsonContainerComponent | JsonFileComponent | JsonMediaGalleryComponent | JsonSectionComponent | JsonSeparatorComponent | JsonTextDisplayComponent | JsonThumbnailComponent;
|
|
170
|
-
export type JsonComponentInContainer = JsonActionRow | JsonFileComponent | JsonMediaGalleryComponent | JsonSectionComponent | JsonSeparatorComponent | JsonTextDisplayComponent;
|
|
171
|
-
export interface JsonContainerComponent {
|
|
172
|
-
components: JsonComponentInContainer[];
|
|
173
|
-
hexAccentColor: string | null;
|
|
174
|
-
spoiler: boolean;
|
|
175
|
-
type: JsonComponentType.Container;
|
|
176
|
-
}
|
|
177
|
-
export interface JsonFileComponent {
|
|
178
|
-
fileName: string | null;
|
|
179
|
-
size: number;
|
|
180
|
-
spoiler: boolean;
|
|
181
|
-
type: JsonComponentType.File;
|
|
182
|
-
url: string;
|
|
183
|
-
}
|
|
184
|
-
export interface JsonMediaGalleryComponent {
|
|
185
|
-
items: {
|
|
186
|
-
media: {
|
|
187
|
-
url: string;
|
|
188
|
-
};
|
|
189
|
-
spoiler: boolean;
|
|
190
|
-
}[];
|
|
191
|
-
type: JsonComponentType.MediaGallery;
|
|
192
|
-
}
|
|
193
|
-
export interface JsonSectionComponent {
|
|
194
|
-
accessory: JsonButtonComponent | JsonThumbnailComponent;
|
|
195
|
-
components: JsonTextDisplayComponent[];
|
|
196
|
-
type: JsonComponentType.Section;
|
|
197
|
-
}
|
|
198
|
-
export interface JsonSeparatorComponent {
|
|
199
|
-
divider: boolean;
|
|
200
|
-
spacing: JsonSeparatorSpacingSize | null;
|
|
201
|
-
type: JsonComponentType.Separator;
|
|
202
|
-
}
|
|
203
|
-
export interface JsonTextDisplayComponent {
|
|
204
|
-
content: string;
|
|
205
|
-
type: JsonComponentType.TextDisplay;
|
|
206
|
-
}
|
|
207
|
-
export interface JsonThumbnailComponent {
|
|
208
|
-
media: {
|
|
209
|
-
url: string;
|
|
210
|
-
};
|
|
211
|
-
spoiler: boolean;
|
|
212
|
-
type: JsonComponentType.Thumbnail;
|
|
213
|
-
}
|
|
214
|
-
export interface JsonData {
|
|
215
|
-
authors: JsonAuthor[];
|
|
216
|
-
channel: JsonDataChannel;
|
|
217
|
-
guild: JsonDataGuild | null;
|
|
218
|
-
messages: JsonMessage[];
|
|
219
|
-
options: TranscriptOptions;
|
|
220
|
-
}
|
|
221
|
-
export interface JsonAuthor {
|
|
222
|
-
avatarURL: string;
|
|
223
|
-
bot: boolean;
|
|
224
|
-
displayName: string;
|
|
225
|
-
guildTag: string | null;
|
|
226
|
-
id: string;
|
|
227
|
-
member: {
|
|
228
|
-
displayHexColor: string;
|
|
229
|
-
displayName: string;
|
|
230
|
-
} | null;
|
|
231
|
-
system: boolean;
|
|
232
|
-
}
|
|
233
|
-
export interface JsonDataGuild {
|
|
234
|
-
icon: string | null;
|
|
235
|
-
id: string;
|
|
236
|
-
name: string;
|
|
237
|
-
}
|
|
238
|
-
export interface JsonDataChannel {
|
|
239
|
-
id: string;
|
|
240
|
-
img: string | null;
|
|
241
|
-
name: string;
|
|
242
|
-
parent: {
|
|
243
|
-
name: string;
|
|
244
|
-
id: string;
|
|
245
|
-
} | null;
|
|
246
|
-
topic: string | null;
|
|
247
|
-
}
|
|
248
|
-
export type Locale = CommonLocales | (string & {});
|
|
249
|
-
export type TimeZone = CommonTimeZones | (string & {});
|
|
250
|
-
type CommonLocales = 'ar-EG' | 'ar-SA' | 'bn-BD' | 'bn-IN' | 'cs-CZ' | 'da-DK' | 'de-AT' | 'de-CH' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-IN' | 'en-US' | 'es-AR' | 'es-CO' | 'es-ES' | 'es-MX' | 'fa-IR' | 'fi-FI' | 'fr-BE' | 'fr-CA' | 'fr-FR' | 'he-IL' | 'hi-IN' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'ms-MY' | 'nl-BE' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'ur-PK' | 'vi-VN' | 'zh-CN' | 'zh-HK' | 'zh-TW';
|
|
251
|
-
type CommonTimeZones = 'Africa/Cairo' | 'Africa/Johannesburg' | 'Africa/Lagos' | 'America/Argentina/Buenos_Aires' | 'America/Bogota' | 'America/Los_Angeles' | 'America/Mexico_City' | 'America/New_York' | 'America/Sao_Paulo' | 'America/Toronto' | 'America/Vancouver' | 'Asia/Bangkok' | 'Asia/Dhaka' | 'Asia/Dubai' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Istanbul' | 'Asia/Jakarta' | 'Asia/Jerusalem' | 'Asia/Karachi' | 'Asia/Kolkata' | 'Asia/Kuala_Lumpur' | 'Asia/Manila' | 'Asia/Riyadh' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Taipei' | 'Asia/Tehran' | 'Asia/Tokyo' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'Europe/Amsterdam' | 'Europe/Athens' | 'Europe/Berlin' | 'Europe/Brussels' | 'Europe/Budapest' | 'Europe/Copenhagen' | 'Europe/Helsinki' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/London' | 'Europe/Madrid' | 'Europe/Moscow' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Prague' | 'Europe/Rome' | 'Europe/Stockholm' | 'Europe/Warsaw' | 'Pacific/Auckland' | 'UTC';
|
|
252
|
-
export declare enum JsonComponentType {
|
|
253
|
-
ActionRow = 1,
|
|
254
|
-
Button = 2,
|
|
255
|
-
StringSelect = 3,
|
|
256
|
-
TextInput = 4,
|
|
257
|
-
UserSelect = 5,
|
|
258
|
-
RoleSelect = 6,
|
|
259
|
-
MentionableSelect = 7,
|
|
260
|
-
ChannelSelect = 8,
|
|
261
|
-
Section = 9,
|
|
262
|
-
TextDisplay = 10,
|
|
263
|
-
Thumbnail = 11,
|
|
264
|
-
MediaGallery = 12,
|
|
265
|
-
File = 13,
|
|
266
|
-
Separator = 14,
|
|
267
|
-
ContentInventoryEntry = 16,
|
|
268
|
-
Container = 17,
|
|
269
|
-
Label = 18,
|
|
270
|
-
FileUpload = 19
|
|
271
|
-
}
|
|
272
|
-
export declare enum JsonSeparatorSpacingSize {
|
|
273
|
-
Small = 1,
|
|
274
|
-
Large = 2
|
|
275
|
-
}
|
|
276
|
-
export declare enum JsonButtonStyle {
|
|
277
|
-
Primary = 1,
|
|
278
|
-
Secondary = 2,
|
|
279
|
-
Success = 3,
|
|
280
|
-
Danger = 4,
|
|
281
|
-
Link = 5,
|
|
282
|
-
Premium = 6
|
|
283
|
-
}
|
|
284
|
-
export {};
|
package/dist/types/types copy.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export var JsonComponentType;
|
|
2
|
-
(function (JsonComponentType) {
|
|
3
|
-
JsonComponentType[JsonComponentType["ActionRow"] = 1] = "ActionRow";
|
|
4
|
-
JsonComponentType[JsonComponentType["Button"] = 2] = "Button";
|
|
5
|
-
JsonComponentType[JsonComponentType["StringSelect"] = 3] = "StringSelect";
|
|
6
|
-
JsonComponentType[JsonComponentType["TextInput"] = 4] = "TextInput";
|
|
7
|
-
JsonComponentType[JsonComponentType["UserSelect"] = 5] = "UserSelect";
|
|
8
|
-
JsonComponentType[JsonComponentType["RoleSelect"] = 6] = "RoleSelect";
|
|
9
|
-
JsonComponentType[JsonComponentType["MentionableSelect"] = 7] = "MentionableSelect";
|
|
10
|
-
JsonComponentType[JsonComponentType["ChannelSelect"] = 8] = "ChannelSelect";
|
|
11
|
-
JsonComponentType[JsonComponentType["Section"] = 9] = "Section";
|
|
12
|
-
JsonComponentType[JsonComponentType["TextDisplay"] = 10] = "TextDisplay";
|
|
13
|
-
JsonComponentType[JsonComponentType["Thumbnail"] = 11] = "Thumbnail";
|
|
14
|
-
JsonComponentType[JsonComponentType["MediaGallery"] = 12] = "MediaGallery";
|
|
15
|
-
JsonComponentType[JsonComponentType["File"] = 13] = "File";
|
|
16
|
-
JsonComponentType[JsonComponentType["Separator"] = 14] = "Separator";
|
|
17
|
-
JsonComponentType[JsonComponentType["ContentInventoryEntry"] = 16] = "ContentInventoryEntry";
|
|
18
|
-
JsonComponentType[JsonComponentType["Container"] = 17] = "Container";
|
|
19
|
-
JsonComponentType[JsonComponentType["Label"] = 18] = "Label";
|
|
20
|
-
JsonComponentType[JsonComponentType["FileUpload"] = 19] = "FileUpload";
|
|
21
|
-
})(JsonComponentType || (JsonComponentType = {}));
|
|
22
|
-
export var JsonSeparatorSpacingSize;
|
|
23
|
-
(function (JsonSeparatorSpacingSize) {
|
|
24
|
-
JsonSeparatorSpacingSize[JsonSeparatorSpacingSize["Small"] = 1] = "Small";
|
|
25
|
-
JsonSeparatorSpacingSize[JsonSeparatorSpacingSize["Large"] = 2] = "Large";
|
|
26
|
-
})(JsonSeparatorSpacingSize || (JsonSeparatorSpacingSize = {}));
|
|
27
|
-
export var JsonButtonStyle;
|
|
28
|
-
(function (JsonButtonStyle) {
|
|
29
|
-
JsonButtonStyle[JsonButtonStyle["Primary"] = 1] = "Primary";
|
|
30
|
-
JsonButtonStyle[JsonButtonStyle["Secondary"] = 2] = "Secondary";
|
|
31
|
-
JsonButtonStyle[JsonButtonStyle["Success"] = 3] = "Success";
|
|
32
|
-
JsonButtonStyle[JsonButtonStyle["Danger"] = 4] = "Danger";
|
|
33
|
-
JsonButtonStyle[JsonButtonStyle["Link"] = 5] = "Link";
|
|
34
|
-
JsonButtonStyle[JsonButtonStyle["Premium"] = 6] = "Premium";
|
|
35
|
-
})(JsonButtonStyle || (JsonButtonStyle = {}));
|
|
File without changes
|
|
File without changes
|