n8n-nodes-discord-dnd 0.1.59 → 0.1.60
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.
@@ -21,159 +21,156 @@ async function fetchReferencedMessage(message) {
|
|
21
21
|
}
|
22
22
|
exports.fetchReferencedMessage = fetchReferencedMessage;
|
23
23
|
function messageToJson(message) {
|
24
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
25
24
|
const n8nMessage = {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
components:
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
})),
|
176
|
-
call: message.call,
|
25
|
+
...message,
|
26
|
+
// id: message.id,
|
27
|
+
// content: message.content,
|
28
|
+
// channelId: message.channelId,
|
29
|
+
// guildId: message.guildId,
|
30
|
+
// createdTimestamp: message.createdTimestamp,
|
31
|
+
// type: message.type,
|
32
|
+
// system: message.system,
|
33
|
+
// isDirectMessage: !message.guild,
|
34
|
+
// author: message.author,
|
35
|
+
// pinned: message.pinned,
|
36
|
+
// tts: message.tts,
|
37
|
+
// nonce: message.nonce,
|
38
|
+
// embeds: message.embeds?.map((embed: any) => ({
|
39
|
+
// title: embed.title,
|
40
|
+
// description: embed.description,
|
41
|
+
// url: embed.url,
|
42
|
+
// timestamp: embed.timestamp,
|
43
|
+
// color: embed.color,
|
44
|
+
// fields: embed.fields?.map((field: any) => ({
|
45
|
+
// name: field.name,
|
46
|
+
// value: field.value,
|
47
|
+
// inline: field.inline,
|
48
|
+
// })),
|
49
|
+
// author: embed.author
|
50
|
+
// ? {
|
51
|
+
// name: embed.author.name,
|
52
|
+
// url: embed.author.url,
|
53
|
+
// iconURL: embed.author.iconURL,
|
54
|
+
// }
|
55
|
+
// : null,
|
56
|
+
// footer: embed.footer
|
57
|
+
// ? {
|
58
|
+
// text: embed.footer.text,
|
59
|
+
// iconURL: embed.footer.iconURL,
|
60
|
+
// }
|
61
|
+
// : null,
|
62
|
+
// image: embed.image ? { url: embed.image.url } : null,
|
63
|
+
// thumbnail: embed.thumbnail ? { url: embed.thumbnail.url } : null,
|
64
|
+
// video: embed.video ? { url: embed.video.url } : null,
|
65
|
+
// })),
|
66
|
+
// components: message.components?.map((component: any) => ({
|
67
|
+
// type: component.type,
|
68
|
+
// components: component.components?.map((comp: any) => ({
|
69
|
+
// type: comp.type,
|
70
|
+
// customId: comp.customId,
|
71
|
+
// label: comp.label,
|
72
|
+
// style: comp.style,
|
73
|
+
// url: comp.url,
|
74
|
+
// disabled: comp.disabled,
|
75
|
+
// })),
|
76
|
+
// })),
|
77
|
+
// attachments: message.attachments?.map((attachment: any) => ({
|
78
|
+
// contentType: attachment.contentType,
|
79
|
+
// description: attachment.description,
|
80
|
+
// duration: attachment.duration,
|
81
|
+
// ephemeral: attachment.ephemeral,
|
82
|
+
// flags: attachment.flags?.toArray(),
|
83
|
+
// height: attachment.height,
|
84
|
+
// id: attachment.id,
|
85
|
+
// name: attachment.name,
|
86
|
+
// proxyURL: attachment.proxyURL,
|
87
|
+
// size: attachment.size,
|
88
|
+
// spoiler: attachment.spoiler,
|
89
|
+
// title: attachment.title,
|
90
|
+
// url: attachment.url,
|
91
|
+
// waveform: attachment.waveform,
|
92
|
+
// width: attachment.width,
|
93
|
+
// })),
|
94
|
+
// stickers: message.stickers?.map((sticker: any) => ({
|
95
|
+
// id: sticker.id,
|
96
|
+
// name: sticker.name,
|
97
|
+
// formatType: sticker.formatType,
|
98
|
+
// })),
|
99
|
+
// position: message.position,
|
100
|
+
// roleSubscriptionData: message.roleSubscriptionData,
|
101
|
+
// editedTimestamp: message.editedTimestamp,
|
102
|
+
// mentions: {
|
103
|
+
// everyone: message.mentions?.everyone,
|
104
|
+
// users:
|
105
|
+
// message.mentions?.users?.map((user: any) => ({
|
106
|
+
// id: user.id,
|
107
|
+
// username: user.username,
|
108
|
+
// discriminator: user.discriminator,
|
109
|
+
// globalName: user.globalName,
|
110
|
+
// avatar: user.avatar,
|
111
|
+
// })) || [],
|
112
|
+
// roles:
|
113
|
+
// message.mentions?.roles?.map((role: any) => ({
|
114
|
+
// id: role.id,
|
115
|
+
// name: role.name,
|
116
|
+
// color: role.color,
|
117
|
+
// })) || [],
|
118
|
+
// crosspostedChannels:
|
119
|
+
// message.mentions?.crosspostedChannels?.map((channel: any) => ({
|
120
|
+
// id: channel.id,
|
121
|
+
// guildId: channel.guildId,
|
122
|
+
// type: channel.type,
|
123
|
+
// })) || [],
|
124
|
+
// repliedUser: message.mentions?.repliedUser
|
125
|
+
// ? {
|
126
|
+
// id: message.mentions.repliedUser.id,
|
127
|
+
// username: message.mentions.repliedUser.username,
|
128
|
+
// discriminator: message.mentions.repliedUser.discriminator,
|
129
|
+
// globalName: message.mentions.repliedUser.globalName,
|
130
|
+
// avatar: message.mentions.repliedUser.avatar,
|
131
|
+
// }
|
132
|
+
// : null,
|
133
|
+
// repliedMessage:
|
134
|
+
// message.reference && message.reference.messageId
|
135
|
+
// ? {
|
136
|
+
// id: message.reference.messageId,
|
137
|
+
// channelId: message.reference.channelId,
|
138
|
+
// guildId: message.reference.guildId,
|
139
|
+
// content: null, // Will be populated if fetchReferencedMessage is called
|
140
|
+
// }
|
141
|
+
// : null,
|
142
|
+
// members:
|
143
|
+
// message.mentions?.members?.map((member: any) => ({
|
144
|
+
// id: member.id,
|
145
|
+
// nickname: member.nickname,
|
146
|
+
// })) || [],
|
147
|
+
// channels:
|
148
|
+
// message.mentions?.channels?.map((channel: any) => ({
|
149
|
+
// id: channel.id,
|
150
|
+
// name: channel.name,
|
151
|
+
// type: channel.type,
|
152
|
+
// })) || [],
|
153
|
+
// },
|
154
|
+
// webhookId: message.webhookId,
|
155
|
+
// applicationId: message.applicationId,
|
156
|
+
// activity: message.activity,
|
157
|
+
// flags: message.flags?.toArray(),
|
158
|
+
// reference: message.reference,
|
159
|
+
// interaction: message.interactionMetadata
|
160
|
+
// ? {
|
161
|
+
// id: message.interactionMetadata.id,
|
162
|
+
// type: message.interactionMetadata.type,
|
163
|
+
// userId: message.interactionMetadata.user?.id,
|
164
|
+
// }
|
165
|
+
// : null,
|
166
|
+
// poll: message.poll,
|
167
|
+
// messageSnapshots: message.messageSnapshots?.map((snapshot: any) => ({
|
168
|
+
// message: {
|
169
|
+
// id: snapshot.message.id,
|
170
|
+
// content: snapshot.message.content,
|
171
|
+
// },
|
172
|
+
// })),
|
173
|
+
// call: message.call,
|
177
174
|
};
|
178
175
|
return n8nMessage;
|
179
176
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MessageTransformer.js","sourceRoot":"","sources":["../../src/transformers/MessageTransformer.ts"],"names":[],"mappings":";;;AAaA;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAC1C,OAAgB;IAEhB,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE;QACpD,IAAI;YACF,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;YACzD,OAAO,iBAAiB,CAAC,OAAO,CAAC;SAClC;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;YAC3D,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,wDAaC;AAED,SAAgB,aAAa,CAAC,OAAgB
|
1
|
+
{"version":3,"file":"MessageTransformer.js","sourceRoot":"","sources":["../../src/transformers/MessageTransformer.ts"],"names":[],"mappings":";;;AAaA;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAC1C,OAAgB;IAEhB,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE;QACpD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