n8n-nodes-discord-dnd 0.1.9 → 0.1.11

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.
@@ -1,4 +1,4 @@
1
- import { INodeType, ITriggerFunctions, ITriggerResponse, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
1
+ import { INodeType, ITriggerFunctions, ITriggerResponse, ILoadOptionsFunctions, INodePropertyOptions } from "n8n-workflow";
2
2
  /**
3
3
  * Discord Trigger node for n8n
4
4
  * This is the main entry point for the node
@@ -8,7 +8,6 @@ export declare class DiscordTrigger implements INodeType {
8
8
  methods: {
9
9
  loadOptions: {
10
10
  getServers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
11
- getEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
12
11
  };
13
12
  };
14
13
  trigger(this: ITriggerFunctions): Promise<ITriggerResponse>;
@@ -14,16 +14,16 @@ class DiscordTrigger {
14
14
  this.methods = {
15
15
  loadOptions: {
16
16
  async getServers() {
17
- const credentials = await this.getCredentials('discordApi');
17
+ const credentials = (await this.getCredentials("discordApi"));
18
18
  const client = await (0, client_1.initializeDiscordClient)(credentials.botToken);
19
19
  // Wait for client to be ready
20
20
  await new Promise((resolve) => {
21
21
  if (client.isReady())
22
22
  resolve();
23
23
  else
24
- client.once('ready', () => resolve());
24
+ client.once("ready", () => resolve());
25
25
  });
26
- const servers = client.guilds.cache.map(guild => ({
26
+ const servers = client.guilds.cache.map((guild) => ({
27
27
  name: guild.name,
28
28
  value: guild.id,
29
29
  description: `Server ID: ${guild.id}`,
@@ -32,90 +32,41 @@ class DiscordTrigger {
32
32
  client.destroy();
33
33
  return servers;
34
34
  },
35
- async getEvents() {
36
- const resource = this.getCurrentNodeParameter('resource');
37
- // Map of Discord events by resource
38
- const eventMap = {
39
- guild: [
40
- { name: 'Guild Create', value: 'guildCreate', description: 'Bot joins a guild' },
41
- { name: 'Guild Update', value: 'guildUpdate', description: 'Guild is updated' },
42
- { name: 'Guild Delete', value: 'guildDelete', description: 'Bot removed from a guild' },
43
- ],
44
- member: [
45
- { name: 'Guild Member Add', value: 'guildMemberAdd', description: 'User joins a guild' },
46
- { name: 'Guild Member Remove', value: 'guildMemberRemove', description: 'User leaves a guild' },
47
- { name: 'Guild Member Update', value: 'guildMemberUpdate', description: 'Member is updated' },
48
- ],
49
- message: [
50
- { name: 'Message Create', value: 'messageCreate', description: 'Message is created' },
51
- { name: 'Message Update', value: 'messageUpdate', description: 'Message is updated' },
52
- { name: 'Message Delete', value: 'messageDelete', description: 'Message is deleted' },
53
- ],
54
- channel: [
55
- { name: 'Channel Create', value: 'channelCreate', description: 'Channel is created' },
56
- { name: 'Channel Update', value: 'channelUpdate', description: 'Channel is updated' },
57
- { name: 'Channel Delete', value: 'channelDelete', description: 'Channel is deleted' },
58
- ],
59
- reaction: [
60
- { name: 'Message Reaction Add', value: 'messageReactionAdd', description: 'Reaction is added to a message' },
61
- { name: 'Message Reaction Remove', value: 'messageReactionRemove', description: 'Reaction is removed from a message' },
62
- ],
63
- role: [
64
- { name: 'Role Create', value: 'roleCreate', description: 'Role is created' },
65
- { name: 'Role Update', value: 'roleUpdate', description: 'Role is updated' },
66
- { name: 'Role Delete', value: 'roleDelete', description: 'Role is deleted' },
67
- ],
68
- invite: [
69
- { name: 'Invite Create', value: 'inviteCreate', description: 'Invite is created' },
70
- { name: 'Invite Delete', value: 'inviteDelete', description: 'Invite is deleted' },
71
- ],
72
- voice: [
73
- { name: 'Voice State Update', value: 'voiceStateUpdate', description: 'User voice state changes' },
74
- ],
75
- presence: [
76
- { name: 'Presence Update', value: 'presenceUpdate', description: 'User presence is updated' },
77
- ],
78
- other: [
79
- { name: 'Interaction Create', value: 'interactionCreate', description: 'Interaction is created (slash command, button, etc.)' },
80
- ],
81
- };
82
- return eventMap[resource] || [];
83
- },
84
35
  },
85
36
  };
86
37
  }
87
38
  async trigger() {
88
- const credentials = await this.getCredentials('discordApi');
39
+ const credentials = (await this.getCredentials("discordApi"));
89
40
  // Get resource and event from node parameters
90
- const resource = this.getNodeParameter('resource', 'message');
91
- const event = this.getNodeParameter('event', 'messageCreate');
41
+ const resource = this.getNodeParameter("resource", "message");
42
+ const event = this.getNodeParameter("event", "messageCreate");
92
43
  // Extract other parameters as before
93
44
  const parameters = {
94
- triggerType: this.getNodeParameter('triggerType', 'messageContent'),
95
- includeBotMessages: this.getNodeParameter('includeBotMessages', false),
96
- filterByServers: this.getNodeParameter('filterByServers', false),
45
+ triggerType: this.getNodeParameter("triggerType", "messageContent"),
46
+ includeBotMessages: this.getNodeParameter("includeBotMessages", false),
47
+ filterByServers: this.getNodeParameter("filterByServers", false),
97
48
  serverIds: [],
98
- filterByChannels: this.getNodeParameter('filterByChannels', false),
49
+ filterByChannels: this.getNodeParameter("filterByChannels", false),
99
50
  channelIds: [],
100
- filterByRoles: this.getNodeParameter('filterByRoles', false),
51
+ filterByRoles: this.getNodeParameter("filterByRoles", false),
101
52
  roleIds: [],
102
53
  };
103
54
  // Process server filter parameters
104
55
  if (parameters.filterByServers) {
105
- parameters.serverFilterMethod = this.getNodeParameter('serverFilterMethod', 'fromList');
56
+ parameters.serverFilterMethod = this.getNodeParameter("serverFilterMethod", "fromList");
106
57
  switch (parameters.serverFilterMethod) {
107
- case 'fromList':
108
- parameters.serverIds = this.getNodeParameter('serverIds', []);
58
+ case "fromList":
59
+ parameters.serverIds = this.getNodeParameter("serverIds", []);
109
60
  break;
110
- case 'byUrl':
111
- const url = this.getNodeParameter('serverUrl', '');
112
- const serverIdFromUrl = url.split('/').pop();
61
+ case "byUrl":
62
+ const url = this.getNodeParameter("serverUrl", "");
63
+ const serverIdFromUrl = url.split("/").pop();
113
64
  if (serverIdFromUrl) {
114
65
  parameters.serverIds = [serverIdFromUrl];
115
66
  }
116
67
  break;
117
- case 'byId':
118
- const serverId = this.getNodeParameter('serverId', '');
68
+ case "byId":
69
+ const serverId = this.getNodeParameter("serverId", "");
119
70
  if (serverId) {
120
71
  parameters.serverIds = [serverId];
121
72
  }
@@ -123,28 +74,28 @@ class DiscordTrigger {
123
74
  }
124
75
  }
125
76
  if (parameters.filterByChannels) {
126
- parameters.channelIds = this.getNodeParameter('channelIds', '')
127
- .split(',')
128
- .map(id => id.trim());
77
+ parameters.channelIds = this.getNodeParameter("channelIds", "")
78
+ .split(",")
79
+ .map((id) => id.trim());
129
80
  }
130
81
  if (parameters.filterByRoles) {
131
- parameters.roleIds = this.getNodeParameter('roleIds', '')
132
- .split(',')
133
- .map(id => id.trim());
82
+ parameters.roleIds = this.getNodeParameter("roleIds", "")
83
+ .split(",")
84
+ .map((id) => id.trim());
134
85
  }
135
86
  // Get trigger-specific parameters
136
- if (parameters.triggerType === 'messageContent') {
137
- parameters.matchPattern = this.getNodeParameter('matchPattern', '');
138
- if (['contains', 'endsWith', 'equals', 'startsWith'].includes(parameters.matchPattern)) {
139
- parameters.matchValue = this.getNodeParameter('matchValue', '');
140
- parameters.caseSensitive = this.getNodeParameter('caseSensitive', false);
87
+ if (parameters.triggerType === "messageContent") {
88
+ parameters.matchPattern = this.getNodeParameter("matchPattern", "");
89
+ if (["contains", "endsWith", "equals", "startsWith"].includes(parameters.matchPattern)) {
90
+ parameters.matchValue = this.getNodeParameter("matchValue", "");
91
+ parameters.caseSensitive = this.getNodeParameter("caseSensitive", false);
141
92
  }
142
- else if (parameters.matchPattern === 'regex') {
143
- parameters.regexPattern = this.getNodeParameter('regexPattern', '');
93
+ else if (parameters.matchPattern === "regex") {
94
+ parameters.regexPattern = this.getNodeParameter("regexPattern", "");
144
95
  }
145
96
  }
146
- else if (parameters.triggerType === 'botInteraction') {
147
- parameters.interactionType = this.getNodeParameter('interactionType', 'botMentioned');
97
+ else if (parameters.triggerType === "botInteraction") {
98
+ parameters.interactionType = this.getNodeParameter("interactionType", "botMentioned");
148
99
  }
149
100
  // Initialize Discord client
150
101
  const client = await (0, client_1.initializeDiscordClient)(credentials.botToken);
@@ -156,7 +107,7 @@ class DiscordTrigger {
156
107
  // Listen only for the selected event
157
108
  (0, event_handlers_1.setupSelectedEventHandler)(client, this, event);
158
109
  const closeFunction = async () => {
159
- console.log('Disconnecting from Discord...');
110
+ console.log("Disconnecting from Discord...");
160
111
  client.destroy();
161
112
  };
162
113
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/src/discord-trigger/index.ts"],"names":[],"mappings":";;;AAQA,qCAAmD;AACnD,qDAAuF;AACvF,yDAAqD;AAIrD;;;GAGG;AACH,MAAa,cAAc;IAA3B;QACE,gBAAW,GAAG,kCAAe,CAAC;QAE9B,YAAO,GAAG;YACR,WAAW,EAAE;gBACX,KAAK,CAAC,UAAU;oBACd,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CAAmC,CAAC;oBAC9F,MAAM,MAAM,GAAG,MAAM,IAAA,gCAAuB,EAAC,WAAW,CAAC,QAAkB,CAAC,CAAC;oBAE7E,8BAA8B;oBAC9B,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;wBAClC,IAAI,MAAM,CAAC,OAAO,EAAE;4BAAE,OAAO,EAAE,CAAC;;4BAC3B,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBAEH,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAChD,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,KAAK,EAAE,KAAK,CAAC,EAAE;wBACf,WAAW,EAAE,cAAc,KAAK,CAAC,EAAE,EAAE;qBACtC,CAAC,CAAC,CAAC;oBAEJ,kBAAkB;oBAClB,MAAM,CAAC,OAAO,EAAE,CAAC;oBAEjB,OAAO,OAAO,CAAC;gBACjB,CAAC;gBACD,KAAK,CAAC,SAAS;oBACb,MAAM,Q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C;QAE/C,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YAC7C,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC;QAEF,OAAO;YACL,GAAG,YAAY;YACf,aAAa;SACd,CAAC;IACJ,CAAC;CACF;AAzKD,wCAyKC"}
@@ -1,2 +1,2 @@
1
- import { INodeTypeDescription } from 'n8n-workflow';
1
+ import { INodeTypeDescription } from "n8n-workflow";
2
2
  export declare const nodeDescription: INodeTypeDescription;
@@ -2,241 +2,108 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nodeDescription = void 0;
4
4
  exports.nodeDescription = {
5
- displayName: 'Discord Trigger',
6
- name: 'discordTrigger',
7
- icon: 'file:discord.svg',
8
- group: ['trigger'],
5
+ displayName: "Discord Trigger",
6
+ name: "discordTrigger",
7
+ icon: "file:discord.svg",
8
+ group: ["trigger"],
9
9
  version: 1,
10
- description: 'Starts the workflow when Discord events occur',
11
- defaults: {
12
- name: 'Discord Trigger',
13
- },
10
+ description: "Starts the workflow when Discord events occur",
11
+ defaults: { name: "Discord Trigger", color: "#7289DA" },
14
12
  inputs: [],
15
- outputs: ['main'],
13
+ outputs: ["main"],
16
14
  credentials: [
17
15
  {
18
- name: 'discordApi',
16
+ name: "discordApi",
19
17
  required: true,
20
18
  },
21
19
  ],
22
20
  properties: [
23
21
  {
24
- displayName: 'Resource',
25
- name: 'resource',
26
- type: 'options',
22
+ displayName: "Resource",
23
+ name: "resource",
24
+ type: "options",
27
25
  options: [
28
- { name: 'Guild', value: 'guild' },
29
- { name: 'Member', value: 'member' },
30
- { name: 'Message', value: 'message' },
31
- { name: 'Channel', value: 'channel' },
32
- { name: 'Reaction', value: 'reaction' },
33
- { name: 'Role', value: 'role' },
34
- { name: 'Invite', value: 'invite' },
35
- { name: 'Voice', value: 'voice' },
36
- { name: 'Presence', value: 'presence' },
37
- { name: 'Other', value: 'other' },
26
+ { name: "Guild", value: "guild" },
27
+ { name: "Member", value: "member" },
28
+ { name: "Message", value: "message" },
29
+ { name: "Moderation", value: "moderation" },
30
+ { name: "Emoji & Sticker", value: "emojiSticker" },
31
+ { name: "Integration & Webhook", value: "integrationWebhook" },
32
+ { name: "Invite", value: "invite" },
33
+ { name: "Voice", value: "voice" },
34
+ { name: "Presence", value: "presence" },
35
+ { name: "Scheduled Event", value: "scheduledEvent" },
36
+ { name: "Interaction", value: "interaction" },
37
+ { name: "Bot Status", value: "botStatus" },
38
+ { name: "User", value: "user" },
39
+ { name: "Auto Moderation", value: "autoModeration" },
40
+ { name: "Poll", value: "poll" },
41
+ { name: "Other", value: "other" },
38
42
  ],
39
- default: 'message',
43
+ default: "message",
40
44
  required: true,
41
- description: 'The Discord resource to listen for events on',
45
+ description: "The Discord resource to listen for events on",
42
46
  },
43
47
  {
44
- displayName: 'Event',
45
- name: 'event',
46
- type: 'options',
47
- typeOptions: {
48
- loadOptionsMethod: 'getEvents',
49
- },
50
- default: 'messageCreate',
48
+ displayName: "Event",
49
+ name: "event",
50
+ type: "options",
51
+ default: "",
52
+ description: "The Discord event to trigger on",
51
53
  required: true,
52
- description: 'The Discord event to trigger on',
53
- displayOptions: {
54
- show: {
55
- resource: [
56
- 'guild', 'member', 'message', 'channel', 'reaction', 'role', 'invite', 'voice', 'presence', 'other',
57
- ],
58
- },
59
- },
60
- },
61
- {
62
- displayName: 'Trigger Type',
63
- name: 'triggerType',
64
- type: 'options',
65
54
  options: [
55
+ // Dynamically populated based on resource
56
+ // Example for 'guild' resource
66
57
  {
67
- name: 'Message Content',
68
- value: 'messageContent',
69
- description: 'Triggered based on message content patterns',
70
- },
71
- {
72
- name: 'Bot Interaction',
73
- value: 'botInteraction',
74
- description: 'Triggered when users interact with the bot',
75
- },
76
- ],
77
- default: 'messageContent',
78
- required: true,
79
- },
80
- // Bot Interaction Options
81
- {
82
- displayName: 'Interaction Type',
83
- name: 'interactionType',
84
- type: 'options',
85
- displayOptions: {
86
- show: {
87
- triggerType: ['botInteraction'],
58
+ name: "Channel Create",
59
+ value: "channelCreate",
60
+ displayOptions: { show: { resource: ["guild"] } },
88
61
  },
89
- },
90
- options: [
91
62
  {
92
- name: 'Bot Mentioned',
93
- value: 'botMentioned',
94
- description: 'Triggered when someone mentions the bot in a message',
63
+ name: "Channel Delete",
64
+ value: "channelDelete",
65
+ displayOptions: { show: { resource: ["guild"] } },
95
66
  },
67
+ // ... Add all events for each resource
68
+ // Example for 'message' resource
96
69
  {
97
- name: 'Message Replied To',
98
- value: 'messageReplied',
99
- description: 'Triggered when someone replies to a message from the bot',
70
+ name: "Message Create",
71
+ value: "messageCreate",
72
+ displayOptions: { show: { resource: ["message"] } },
100
73
  },
74
+ // ... Continue for other resources
101
75
  ],
102
- default: 'botMentioned',
103
- required: true,
104
76
  },
105
- // Message Content Options
106
77
  {
107
- displayName: 'Match Pattern',
108
- name: 'matchPattern',
109
- type: 'options',
110
- displayOptions: {
111
- show: {
112
- triggerType: ['messageContent'],
113
- },
114
- },
115
- options: [
116
- {
117
- name: 'Bot Mention',
118
- value: 'botMention',
119
- description: 'The bot has to be mentioned somewhere in the message',
120
- },
121
- {
122
- name: 'Contains',
123
- value: 'contains',
124
- description: 'Match the value in any position in the message',
125
- },
126
- {
127
- name: 'Contains Image',
128
- value: 'containsImage',
129
- description: 'Triggers when a message contains an image attachment',
130
- },
131
- {
132
- name: 'Ends With',
133
- value: 'endsWith',
134
- description: 'Match the message ending with the specified value',
135
- },
136
- {
137
- name: 'Equals',
138
- value: 'equals',
139
- description: 'Match the exact same value',
140
- },
141
- {
142
- name: 'Every',
143
- value: 'every',
144
- description: 'Triggers on every discord message',
145
- },
146
- {
147
- name: 'Regex',
148
- value: 'regex',
149
- description: 'Match the custom ECMAScript regex provided',
150
- },
151
- {
152
- name: 'Starts With',
153
- value: 'startsWith',
154
- description: 'Match the message beginning with the specified value',
155
- },
156
- ],
157
- default: 'botMention',
158
- required: true,
159
- },
160
- {
161
- displayName: 'Value to Match',
162
- name: 'matchValue',
163
- type: 'string',
164
- default: '',
165
- description: 'The text value to match in the message',
166
- required: true,
167
- displayOptions: {
168
- show: {
169
- triggerType: ['messageContent'],
170
- matchPattern: ['contains', 'endsWith', 'equals', 'startsWith'],
171
- },
172
- },
173
- },
174
- {
175
- displayName: 'Regex Pattern',
176
- name: 'regexPattern',
177
- type: 'string',
178
- default: '',
179
- placeholder: '^\\w+$',
180
- description: 'The regular expression to match against the message content',
181
- required: true,
182
- displayOptions: {
183
- show: {
184
- triggerType: ['messageContent'],
185
- matchPattern: ['regex'],
186
- },
187
- },
188
- },
189
- {
190
- displayName: 'Case Sensitive',
191
- name: 'caseSensitive',
192
- type: 'boolean',
193
- default: false,
194
- description: 'Whether the matching should be case sensitive',
195
- displayOptions: {
196
- show: {
197
- triggerType: ['messageContent'],
198
- matchPattern: ['contains', 'endsWith', 'equals', 'startsWith'],
199
- },
200
- },
201
- },
202
- // Common Options
203
- {
204
- displayName: 'Include Bot Messages',
205
- name: 'includeBotMessages',
206
- type: 'boolean',
78
+ displayName: "Filter by Servers",
79
+ name: "filterByServers",
80
+ type: "boolean",
207
81
  default: false,
208
- description: 'Whether to include messages from other bots or only from users',
82
+ description: "Whether to filter messages by specific servers",
209
83
  },
210
84
  {
211
- displayName: 'Filter by Servers',
212
- name: 'filterByServers',
213
- type: 'boolean',
214
- default: false,
215
- description: 'Whether to filter messages by specific servers',
216
- },
217
- {
218
- displayName: 'Server Filter Method',
219
- name: 'serverFilterMethod',
220
- type: 'options',
85
+ displayName: "Server Filter Method",
86
+ name: "serverFilterMethod",
87
+ type: "options",
221
88
  options: [
222
89
  {
223
- name: 'From List',
224
- value: 'fromList',
225
- description: 'Select from servers the bot has joined',
90
+ name: "From List",
91
+ value: "fromList",
92
+ description: "Select from servers the bot has joined",
226
93
  },
227
94
  {
228
- name: 'By URL',
229
- value: 'byUrl',
230
- description: 'Filter by Discord server URL',
95
+ name: "By URL",
96
+ value: "byUrl",
97
+ description: "Filter by Discord server URL",
231
98
  },
232
99
  {
233
- name: 'By ID',
234
- value: 'byId',
235
- description: 'Filter by server ID',
100
+ name: "By ID",
101
+ value: "byId",
102
+ description: "Filter by server ID",
236
103
  },
237
104
  ],
238
- default: 'fromList',
239
- description: 'Method to filter servers',
105
+ default: "fromList",
106
+ description: "Method to filter servers",
240
107
  displayOptions: {
241
108
  show: {
242
109
  filterByServers: [true],
@@ -244,88 +111,48 @@ exports.nodeDescription = {
244
111
  },
245
112
  },
246
113
  {
247
- displayName: 'Server URL',
248
- name: 'serverUrl',
249
- type: 'string',
250
- default: '',
251
- description: 'Discord server URL (e.g: https://discord.com/channels/820342303745900635)',
114
+ displayName: "Server URL",
115
+ name: "serverUrl",
116
+ type: "string",
117
+ default: "",
118
+ description: "Discord server URL (e.g: https://discord.com/channels/820342303745900635)",
252
119
  displayOptions: {
253
120
  show: {
254
121
  filterByServers: [true],
255
- serverFilterMethod: ['byUrl'],
122
+ serverFilterMethod: ["byUrl"],
256
123
  },
257
124
  },
258
- placeholder: 'https://discord.com/channels/820342303745900635',
125
+ placeholder: "https://discord.com/channels/820342303745900635",
259
126
  },
260
127
  {
261
- displayName: 'Server ID',
262
- name: 'serverId',
263
- type: 'string',
264
- default: '',
265
- description: 'Discord server ID',
128
+ displayName: "Server ID",
129
+ name: "serverId",
130
+ type: "string",
131
+ default: "",
132
+ description: "Discord server ID",
266
133
  displayOptions: {
267
134
  show: {
268
135
  filterByServers: [true],
269
- serverFilterMethod: ['byId'],
136
+ serverFilterMethod: ["byId"],
270
137
  },
271
138
  },
272
- placeholder: '820342303745900635',
139
+ placeholder: "820342303745900635",
273
140
  },
274
141
  {
275
- displayName: 'Server List',
276
- name: 'serverIds',
277
- type: 'multiOptions',
142
+ displayName: "Server List",
143
+ name: "serverIds",
144
+ type: "multiOptions",
278
145
  typeOptions: {
279
- loadOptionsMethod: 'getServers',
146
+ loadOptionsMethod: "getServers",
280
147
  },
281
148
  default: [],
282
- description: 'Select servers from the list',
149
+ description: "Select servers from the list",
283
150
  displayOptions: {
284
151
  show: {
285
152
  filterByServers: [true],
286
- serverFilterMethod: ['fromList'],
287
- },
288
- },
289
- },
290
- {
291
- displayName: 'Filter by Channels',
292
- name: 'filterByChannels',
293
- type: 'boolean',
294
- default: false,
295
- description: 'Whether to filter messages by specific channels',
296
- },
297
- {
298
- displayName: 'Listen to Channels',
299
- name: 'channelIds',
300
- type: 'string',
301
- default: '',
302
- description: 'Comma-separated list of channel names or IDs to listen to (empty for all channels)',
303
- displayOptions: {
304
- show: {
305
- filterByChannels: [true],
306
- },
307
- },
308
- placeholder: 'general, 1234567890123456',
309
- },
310
- {
311
- displayName: 'Filter by Roles',
312
- name: 'filterByRoles',
313
- type: 'boolean',
314
- default: false,
315
- description: 'Whether to filter messages by user roles',
316
- },
317
- {
318
- displayName: 'Listen to Roles',
319
- name: 'roleIds',
320
- type: 'string',
321
- default: '',
322
- description: 'Comma-separated list of role names or IDs to listen to (empty for all roles)',
323
- displayOptions: {
324
- show: {
325
- filterByRoles: [true],
153
+ serverFilterMethod: ["fromList"],
326
154
  },
327
155
  },
328
- placeholder: 'admin, 1234567890123456',
329
156
  },
330
157
  ],
331
158
  };
@@ -1 +1 @@
1
- {"version":3,"file":"node-description.js","sourceRoot":"","sources":["../../../../nodes/src/discord-trigger/node-description.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAyB;IACnD,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,+CAA+C;IAC5D,QAAQ,EAAE;QACR,IAAI,EAAE,iBAAiB;KACxB;IACD,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,WAAW,EAAE;QACX;YACE,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI;SACf;KACF;IACD,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AI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,8EAA8E;YAC3F,cAAc,EAAE;gBACd,IAAI,EAAE;oBACJ,aAAa,EAAE,CAAC,IAAI,CAAC;iBACtB;aACF;YACD,WAAW,EAAE,yBAAyB;SACvC;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"node-description.js","sourceRoot":"","sources":["../../../../nodes/src/discord-trigger/node-description.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAyB;IACnD,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,+CAA+C;IAC5D,QAAQ,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,EAAE;IACvD,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,WAAW,EAAE;QACX;YACE,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI;SACf;KACF;IACD,UAAU,EAAE;QACV;YACE,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;gBACjC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;gBACnC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;gBACrC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;gBAC3C,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,cAAc,EAAE;gBAClD,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,oBAAoB,EAAE;gBAC9D,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE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,EAAE;oBACJ,eAAe,EAAE,CAAC,IAAI,CAAC;oBACvB,kBAAkB,EAAE,CAAC,MAAM,CAAC;iBAC7B;aACF;YACD,WAAW,EAAE,oBAAoB;SAClC;QACD;YACE,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE;gBACX,iBAAiB,EAAE,YAAY;aAChC;YACD,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,8BAA8B;YAC3C,cAAc,EAAE;gBACd,IAAI,EAAE;oBACJ,eAAe,EAAE,CAAC,IAAI,CAAC;oBACvB,kBAAkB,EAAE,CAAC,UAAU,CAAC;iBACjC;aACF;SACF;KACF;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-discord-dnd",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "n8n node to create triggers for Discord events",
5
5
  "keywords": [
6
6
  "n8n",
@@ -21,7 +21,7 @@
21
21
  "lint": "tslint -p tsconfig.json -c tslint.json",
22
22
  "watch": "tsc --watch",
23
23
  "test": "jest",
24
- "publish": " rm -rf dist && npm run build && npm publish"
24
+ "start:publish": " rm -rf dist && npm run build && npm publish"
25
25
  },
26
26
  "files": [
27
27
  "dist"