@lucifer666333/n8n-discord-bot 1.0.0

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.
Files changed (127) hide show
  1. package/LICENSE.md +42 -0
  2. package/README.md +357 -0
  3. package/dist/credentials/DiscordApi.credentials.d.ts +7 -0
  4. package/dist/credentials/DiscordApi.credentials.js +77 -0
  5. package/dist/credentials/DiscordApi.credentials.js.map +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.js +20 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/nodes/Discord/Discord.node.d.ts +93 -0
  10. package/dist/nodes/Discord/Discord.node.js +179 -0
  11. package/dist/nodes/Discord/Discord.node.js.map +1 -0
  12. package/dist/nodes/Discord/Discord.node.options.d.ts +2 -0
  13. package/dist/nodes/Discord/Discord.node.options.js +1350 -0
  14. package/dist/nodes/Discord/Discord.node.options.js.map +1 -0
  15. package/dist/nodes/Discord/DiscordTrigger.node.d.ts +18 -0
  16. package/dist/nodes/Discord/DiscordTrigger.node.js +194 -0
  17. package/dist/nodes/Discord/DiscordTrigger.node.js.map +1 -0
  18. package/dist/nodes/Discord/DiscordTrigger.node.options.d.ts +2 -0
  19. package/dist/nodes/Discord/DiscordTrigger.node.options.js +560 -0
  20. package/dist/nodes/Discord/DiscordTrigger.node.options.js.map +1 -0
  21. package/dist/nodes/Discord/bot/commands/clear.d.ts +9 -0
  22. package/dist/nodes/Discord/bot/commands/clear.js +23 -0
  23. package/dist/nodes/Discord/bot/commands/clear.js.map +1 -0
  24. package/dist/nodes/Discord/bot/commands/logs.d.ts +9 -0
  25. package/dist/nodes/Discord/bot/commands/logs.js +57 -0
  26. package/dist/nodes/Discord/bot/commands/logs.js.map +1 -0
  27. package/dist/nodes/Discord/bot/commands/test.d.ts +8 -0
  28. package/dist/nodes/Discord/bot/commands/test.js +28 -0
  29. package/dist/nodes/Discord/bot/commands/test.js.map +1 -0
  30. package/dist/nodes/Discord/bot/commands.d.ts +3 -0
  31. package/dist/nodes/Discord/bot/commands.js +90 -0
  32. package/dist/nodes/Discord/bot/commands.js.map +1 -0
  33. package/dist/nodes/Discord/bot/discordClientEvents/autoModerationActionExecution.event.d.ts +2 -0
  34. package/dist/nodes/Discord/bot/discordClientEvents/autoModerationActionExecution.event.js +58 -0
  35. package/dist/nodes/Discord/bot/discordClientEvents/autoModerationActionExecution.event.js.map +1 -0
  36. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberAdd.event.d.ts +2 -0
  37. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberAdd.event.js +38 -0
  38. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberAdd.event.js.map +1 -0
  39. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberRemove.event.d.ts +2 -0
  40. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberRemove.event.js +44 -0
  41. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberRemove.event.js.map +1 -0
  42. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberUpdate.event.d.ts +2 -0
  43. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberUpdate.event.js +97 -0
  44. package/dist/nodes/Discord/bot/discordClientEvents/guildMemberUpdate.event.js.map +1 -0
  45. package/dist/nodes/Discord/bot/discordClientEvents/interactionCreateCmd.event.d.ts +2 -0
  46. package/dist/nodes/Discord/bot/discordClientEvents/interactionCreateCmd.event.js +73 -0
  47. package/dist/nodes/Discord/bot/discordClientEvents/interactionCreateCmd.event.js.map +1 -0
  48. package/dist/nodes/Discord/bot/discordClientEvents/interactionCreateUI.event.d.ts +2 -0
  49. package/dist/nodes/Discord/bot/discordClientEvents/interactionCreateUI.event.js +177 -0
  50. package/dist/nodes/Discord/bot/discordClientEvents/interactionCreateUI.event.js.map +1 -0
  51. package/dist/nodes/Discord/bot/discordClientEvents/messageCreate.event.d.ts +2 -0
  52. package/dist/nodes/Discord/bot/discordClientEvents/messageCreate.event.js +55 -0
  53. package/dist/nodes/Discord/bot/discordClientEvents/messageCreate.event.js.map +1 -0
  54. package/dist/nodes/Discord/bot/discordClientEvents/messageDelete.event.d.ts +2 -0
  55. package/dist/nodes/Discord/bot/discordClientEvents/messageDelete.event.js +36 -0
  56. package/dist/nodes/Discord/bot/discordClientEvents/messageDelete.event.js.map +1 -0
  57. package/dist/nodes/Discord/bot/discordClientEvents/messageReactionAdd.event.d.ts +2 -0
  58. package/dist/nodes/Discord/bot/discordClientEvents/messageReactionAdd.event.js +80 -0
  59. package/dist/nodes/Discord/bot/discordClientEvents/messageReactionAdd.event.js.map +1 -0
  60. package/dist/nodes/Discord/bot/discordClientEvents/messageReactionRemove.event.d.ts +2 -0
  61. package/dist/nodes/Discord/bot/discordClientEvents/messageReactionRemove.event.js +80 -0
  62. package/dist/nodes/Discord/bot/discordClientEvents/messageReactionRemove.event.js.map +1 -0
  63. package/dist/nodes/Discord/bot/discordClientEvents/messageUpdate.event.d.ts +2 -0
  64. package/dist/nodes/Discord/bot/discordClientEvents/messageUpdate.event.js +27 -0
  65. package/dist/nodes/Discord/bot/discordClientEvents/messageUpdate.event.js.map +1 -0
  66. package/dist/nodes/Discord/bot/discordClientEvents/modalSubmit.event.d.ts +2 -0
  67. package/dist/nodes/Discord/bot/discordClientEvents/modalSubmit.event.js +90 -0
  68. package/dist/nodes/Discord/bot/discordClientEvents/modalSubmit.event.js.map +1 -0
  69. package/dist/nodes/Discord/bot/discordClientEvents/presenceUpdate.event.d.ts +2 -0
  70. package/dist/nodes/Discord/bot/discordClientEvents/presenceUpdate.event.js +45 -0
  71. package/dist/nodes/Discord/bot/discordClientEvents/presenceUpdate.event.js.map +1 -0
  72. package/dist/nodes/Discord/bot/discordClientEvents/threadCreate.event.d.ts +2 -0
  73. package/dist/nodes/Discord/bot/discordClientEvents/threadCreate.event.js +54 -0
  74. package/dist/nodes/Discord/bot/discordClientEvents/threadCreate.event.js.map +1 -0
  75. package/dist/nodes/Discord/bot/discordClientEvents/threadUpdate.event.d.ts +2 -0
  76. package/dist/nodes/Discord/bot/discordClientEvents/threadUpdate.event.js +27 -0
  77. package/dist/nodes/Discord/bot/discordClientEvents/threadUpdate.event.js.map +1 -0
  78. package/dist/nodes/Discord/bot/discordClientEvents/voiceStateUpdate.event.d.ts +2 -0
  79. package/dist/nodes/Discord/bot/discordClientEvents/voiceStateUpdate.event.js +90 -0
  80. package/dist/nodes/Discord/bot/discordClientEvents/voiceStateUpdate.event.js.map +1 -0
  81. package/dist/nodes/Discord/bot/helpers.d.ts +32 -0
  82. package/dist/nodes/Discord/bot/helpers.js +282 -0
  83. package/dist/nodes/Discord/bot/helpers.js.map +1 -0
  84. package/dist/nodes/Discord/bot/index.d.ts +1 -0
  85. package/dist/nodes/Discord/bot/index.js +136 -0
  86. package/dist/nodes/Discord/bot/index.js.map +1 -0
  87. package/dist/nodes/Discord/bot/ipcEvents/botStatus.ipc.d.ts +3 -0
  88. package/dist/nodes/Discord/bot/ipcEvents/botStatus.ipc.js +25 -0
  89. package/dist/nodes/Discord/bot/ipcEvents/botStatus.ipc.js.map +1 -0
  90. package/dist/nodes/Discord/bot/ipcEvents/credentials.ipc.d.ts +3 -0
  91. package/dist/nodes/Discord/bot/ipcEvents/credentials.ipc.js +54 -0
  92. package/dist/nodes/Discord/bot/ipcEvents/credentials.ipc.js.map +1 -0
  93. package/dist/nodes/Discord/bot/ipcEvents/execution.ipc.d.ts +3 -0
  94. package/dist/nodes/Discord/bot/ipcEvents/execution.ipc.js +69 -0
  95. package/dist/nodes/Discord/bot/ipcEvents/execution.ipc.js.map +1 -0
  96. package/dist/nodes/Discord/bot/ipcEvents/listChannels.ipc.d.ts +3 -0
  97. package/dist/nodes/Discord/bot/ipcEvents/listChannels.ipc.js +31 -0
  98. package/dist/nodes/Discord/bot/ipcEvents/listChannels.ipc.js.map +1 -0
  99. package/dist/nodes/Discord/bot/ipcEvents/listRoles.ipc.d.ts +3 -0
  100. package/dist/nodes/Discord/bot/ipcEvents/listRoles.ipc.js +30 -0
  101. package/dist/nodes/Discord/bot/ipcEvents/listRoles.ipc.js.map +1 -0
  102. package/dist/nodes/Discord/bot/ipcEvents/sendAction.ipc.d.ts +3 -0
  103. package/dist/nodes/Discord/bot/ipcEvents/sendAction.ipc.js +109 -0
  104. package/dist/nodes/Discord/bot/ipcEvents/sendAction.ipc.js.map +1 -0
  105. package/dist/nodes/Discord/bot/ipcEvents/sendMessage.ipc.d.ts +3 -0
  106. package/dist/nodes/Discord/bot/ipcEvents/sendMessage.ipc.js +217 -0
  107. package/dist/nodes/Discord/bot/ipcEvents/sendMessage.ipc.js.map +1 -0
  108. package/dist/nodes/Discord/bot/ipcEvents/sendModal.ipc.d.ts +2 -0
  109. package/dist/nodes/Discord/bot/ipcEvents/sendModal.ipc.js +102 -0
  110. package/dist/nodes/Discord/bot/ipcEvents/sendModal.ipc.js.map +1 -0
  111. package/dist/nodes/Discord/bot/ipcEvents/sendPrompt.ipc.d.ts +3 -0
  112. package/dist/nodes/Discord/bot/ipcEvents/sendPrompt.ipc.js +220 -0
  113. package/dist/nodes/Discord/bot/ipcEvents/sendPrompt.ipc.js.map +1 -0
  114. package/dist/nodes/Discord/bot/ipcEvents/sendWebhook.ipc.d.ts +2 -0
  115. package/dist/nodes/Discord/bot/ipcEvents/sendWebhook.ipc.js +142 -0
  116. package/dist/nodes/Discord/bot/ipcEvents/sendWebhook.ipc.js.map +1 -0
  117. package/dist/nodes/Discord/bot/ipcEvents/trigger.ipc.d.ts +3 -0
  118. package/dist/nodes/Discord/bot/ipcEvents/trigger.ipc.js +114 -0
  119. package/dist/nodes/Discord/bot/ipcEvents/trigger.ipc.js.map +1 -0
  120. package/dist/nodes/Discord/bot/state.d.ts +142 -0
  121. package/dist/nodes/Discord/bot/state.js +65 -0
  122. package/dist/nodes/Discord/bot/state.js.map +1 -0
  123. package/dist/nodes/Discord/bot/voice.d.ts +23 -0
  124. package/dist/nodes/Discord/bot/voice.js +247 -0
  125. package/dist/nodes/Discord/bot/voice.js.map +1 -0
  126. package/dist/nodes/Discord/discord.svg +1 -0
  127. package/package.json +94 -0
package/LICENSE.md ADDED
@@ -0,0 +1,42 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2024-2026 lucifer6661771 (Discord)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ ## Acknowledgments
26
+
27
+ This project builds upon the work of:
28
+
29
+ - **edbrdi** (https://github.com/edbrdi) - Original n8n-nodes-discord implementation
30
+ - **kmcbride3** (https://github.com/Raaid17) - Previous maintainer and contributor
31
+
32
+ ## Third-Party Libraries
33
+
34
+ This project uses the following open-source libraries:
35
+
36
+ - **Discord.js** (https://discord.js.org/) - MIT License
37
+ - **n8n** (https://n8n.io/) - Sustainable Use License
38
+ - **play-dl** (https://github.com/play-dl/play-dl) - MIT License
39
+ - **@discordjs/voice** - Apache-2.0 License
40
+ - **@discordjs/opus** - MIT License
41
+ - **node-ipc** - MIT License
42
+ - **axios** - MIT License
package/README.md ADDED
@@ -0,0 +1,357 @@
1
+ # @lucifer666/lucifer666/discordbotManager
2
+
3
+ ![n8n.io - Workflow Automation](https://raw.githubusercontent.com/n8n-io/n8n/master/assets/n8n-logo.png)
4
+
5
+ **Author: lucifer6661771 (Discord)**
6
+
7
+ Advanced [n8n](https://www.n8n.io) nodes for Discord integration - trigger workflows from Discord events, send interactive messages with buttons/selects, manage voice channels, use slash commands, modals, forums, and more. Built with Discord.js v14.19+ and modern Discord API v10 features.
8
+
9
+ ## ✨ Features
10
+
11
+ ### Core Features
12
+ - 🔔 **Trigger Workflows** from Discord events (messages, commands, interactions, user events)
13
+ - 💬 **Send Messages** with rich embeds, buttons, select menus, and file attachments
14
+ - 🎤 **Voice Channel Support** - Join, leave, play audio, and manage voice states
15
+ - ⚡ **Slash Commands** - Create and respond to Discord slash commands
16
+ - 🔘 **Interactive Components** - Buttons, select menus, and modals
17
+ - 📝 **Thread & Forum Support** - Create and manage threads and forum posts
18
+
19
+ ### New in v1.0.0
20
+ - 🆕 **Modal Support** - Create interactive forms with text inputs
21
+ - 🆕 **Forum Channel Support** - Create and manage forum posts
22
+ - 🆕 **Auto-Moderation Integration** - Trigger workflows from auto-mod events
23
+ - 🆕 **Scheduled Events** - Create and manage Discord scheduled events
24
+ - 🆕 **Webhook Management** - Create and manage Discord webhooks
25
+ - 🆕 **Reaction Triggers** - Trigger workflows when reactions are added/removed
26
+ - 🆕 **Stage Channel Support** - Manage stage channels and speakers
27
+ - 🆕 **Improved Voice** - Better audio playback with play-dl support
28
+ - 🆕 **Context Menus** - User and message context menu commands
29
+ - 🆕 **Autocomplete** - Slash command autocomplete support
30
+ - 🆕 **Timeout/Mute Actions** - Timeout and mute users
31
+ - 🆕 **Channel Management** - Create, edit, and delete channels
32
+ - 🆕 **Role Management** - Enhanced role management with permissions
33
+
34
+ ## 📦 Installation
35
+
36
+ ### Community Nodes (Recommended)
37
+
38
+ 1. Go to **Settings > Community Nodes**.
39
+ 2. Select **Install**.
40
+ 3. Enter `@lucifer666/lucifer666/discordbotManager` in **Enter npm package name**.
41
+ 4. Agree to the [risks](https://docs.n8n.io/integrations/community-nodes/risks/) of using community nodes.
42
+ 5. Select **Install**.
43
+
44
+ ### Manual Installation
45
+
46
+ ```bash
47
+ # In your n8n root directory
48
+ npm install @lucifer666/lucifer666/discordbotManager
49
+ ```
50
+
51
+ For Docker-based deployments, add to your Dockerfile:
52
+ ```dockerfile
53
+ RUN cd /usr/local/lib/node_modules/n8n && npm install @lucifer666/lucifer666/discordbotManager
54
+ ```
55
+
56
+ ## 🤖 Bot Setup
57
+
58
+ ### 1. Create Discord Application
59
+
60
+ 1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)
61
+ 2. Click **New Application** and give it a name
62
+ 3. Go to **OAuth2** and copy the **Client ID**
63
+
64
+ ### 2. Configure Bot
65
+
66
+ 1. Go to **Bot** section
67
+ 2. Click **Add Bot** (if not already created)
68
+ 3. Disable **Public Bot** in Authorization Flow
69
+ 4. Enable all **Privileged Gateway Intents**:
70
+ - Presence Intent
71
+ - Server Members Intent
72
+ - Message Content Intent
73
+ 5. Click **Reset Token** and copy the token
74
+
75
+ ### 3. Generate Invite URL
76
+
77
+ 1. Go to **OAuth2 > URL Generator**
78
+ 2. Select scopes:
79
+ - `bot`
80
+ - `applications.commands`
81
+ 3. Select bot permissions:
82
+ - `Administrator` (recommended) or select specific permissions
83
+ 4. Copy the generated URL and use it to add the bot to your server
84
+
85
+ ### 4. Configure n8n Credentials
86
+
87
+ 1. In n8n, go to **Credentials > New > Discord App**
88
+ 2. Enter:
89
+ - **Client ID**: From OAuth2 page
90
+ - **Bot Token**: From Bot page
91
+ - **n8n API Key**: From Settings > n8n API
92
+ - **Base URL**: Your n8n instance URL (e.g., `https://n8n.example.com/api/v1`)
93
+
94
+ ![Bot Setup](images/bot-1.png)
95
+ ![Credentials](images/credentials.png)
96
+
97
+ ## 📖 Node Reference
98
+
99
+ ### Discord Trigger Node
100
+
101
+ Triggers workflows based on Discord events.
102
+
103
+ #### Trigger Types
104
+
105
+ | Type | Description |
106
+ |------|-------------|
107
+ | **New Message** | When a message is sent in selected channels |
108
+ | **Message Update** | When a message is edited |
109
+ | **Message Delete** | When a message is deleted |
110
+ | **New Thread** | When a thread is created |
111
+ | **Thread Update** | When a thread is updated |
112
+ | **Command** | When a slash command is used |
113
+ | **Interaction** | When a button/select is clicked |
114
+ | **Modal Submit** | When a modal form is submitted |
115
+ | **Reaction Add** | When a reaction is added to a message |
116
+ | **Reaction Remove** | When a reaction is removed |
117
+ | **User Joins** | When a user joins the server |
118
+ | **User Leaves** | When a user leaves the server |
119
+ | **User Presence** | When a user's presence changes |
120
+ | **User Nickname** | When a user's nickname changes |
121
+ | **User Role Add** | When a role is added to a user |
122
+ | **User Role Remove** | When a role is removed from a user |
123
+ | **Voice State** | When a user joins/leaves/moves voice channels |
124
+ | **Auto-Mod** | When auto-moderation is triggered |
125
+
126
+ #### Pattern Matching (Messages/Threads)
127
+
128
+ | Pattern | Description |
129
+ |---------|-------------|
130
+ | **Equals** | Exact match |
131
+ | **Starts with** | Message begins with value |
132
+ | **Contains** | Value found anywhere in message |
133
+ | **Ends with** | Message ends with value |
134
+ | **Regex** | ECMAScript regex pattern |
135
+
136
+ #### Returned Data
137
+
138
+ ```json
139
+ {
140
+ "content": "Message content",
141
+ "channelId": "123456789",
142
+ "userId": "987654321",
143
+ "userName": "username",
144
+ "userTag": "username#0000",
145
+ "messageId": "111222333",
146
+ "guildId": "444555666",
147
+ "attachments": [],
148
+ "embeds": [],
149
+ "mentions": [],
150
+ "referencedMessage": null,
151
+ "interactionValues": [],
152
+ "modalValues": {},
153
+ "presence": "online",
154
+ "voiceState": {}
155
+ }
156
+ ```
157
+
158
+ ### Discord Send Node
159
+
160
+ Sends messages and performs actions in Discord.
161
+
162
+ #### Message Types
163
+
164
+ | Type | Description |
165
+ |------|-------------|
166
+ | **Message** | Send a text message with optional embed |
167
+ | **Button Prompt** | Send buttons and wait for response |
168
+ | **Select Prompt** | Send dropdown menu and wait for response |
169
+ | **Modal** | Show a modal form to the user |
170
+ | **Action** | Perform server actions |
171
+ | **Voice** | Voice channel operations |
172
+ | **Webhook** | Send via webhook |
173
+ | **None** | Update bot status only |
174
+
175
+ #### Embed Options
176
+
177
+ | Field | Description |
178
+ |-------|-------------|
179
+ | Color | Embed sidebar color |
180
+ | Title | Embed title (with optional URL) |
181
+ | Author | Author name, icon, and URL |
182
+ | Description | Main embed text |
183
+ | Thumbnail | Small image in corner |
184
+ | Image | Large image at bottom |
185
+ | Fields | Name/value pairs (inline optional) |
186
+ | Footer | Footer text and icon |
187
+ | Timestamp | Display date/time |
188
+
189
+ #### Action Types
190
+
191
+ | Action | Description |
192
+ |--------|-------------|
193
+ | **Remove Messages** | Delete messages from channel |
194
+ | **Add Role** | Add role(s) to user |
195
+ | **Remove Role** | Remove role(s) from user |
196
+ | **Timeout User** | Timeout a user for specified duration |
197
+ | **Kick User** | Kick user from server |
198
+ | **Ban User** | Ban user from server |
199
+ | **Create Thread** | Create a new thread |
200
+ | **Create Channel** | Create a new channel |
201
+ | **Delete Channel** | Delete a channel |
202
+ | **Create Webhook** | Create a webhook |
203
+ | **Create Event** | Create a scheduled event |
204
+ | **Pin Message** | Pin a message |
205
+ | **Unpin Message** | Unpin a message |
206
+
207
+ #### Voice Actions
208
+
209
+ | Action | Description |
210
+ |--------|-------------|
211
+ | **Join** | Join a voice channel |
212
+ | **Leave** | Leave current voice channel |
213
+ | **Play** | Play audio from URL |
214
+ | **Pause** | Pause current audio |
215
+ | **Resume** | Resume paused audio |
216
+ | **Stop** | Stop audio playback |
217
+ | **Set Volume** | Adjust playback volume |
218
+
219
+ #### Modal Fields
220
+
221
+ Create interactive forms with:
222
+ - **Short Text** - Single line input
223
+ - **Paragraph** - Multi-line input
224
+ - **Required/Optional** fields
225
+ - **Placeholder text**
226
+ - **Min/Max length** validation
227
+
228
+ ### Bot Commands
229
+
230
+ Built-in slash commands for administration:
231
+
232
+ | Command | Description |
233
+ |---------|-------------|
234
+ | `/logs` | View bot logs |
235
+ | `/logs [number]` | View last N logs |
236
+ | `/logs clear` | Clear log history |
237
+ | `/logs on` | Enable auto-logging to channel |
238
+ | `/logs off` | Disable auto-logging |
239
+ | `/clear [number]` | Delete last N messages |
240
+ | `/test` | Toggle test mode |
241
+ | `/status` | View bot status |
242
+ | `/ping` | Check bot latency |
243
+
244
+ ## 🔧 Advanced Usage
245
+
246
+ ### Using Placeholders
247
+
248
+ Placeholders show loading states while workflows execute:
249
+
250
+ 1. Set a placeholder in the trigger node
251
+ 2. The placeholder shows animated dots while processing
252
+ 3. Replace the placeholder with the final response in a Send node
253
+
254
+ ### Persistent Interactions
255
+
256
+ Create buttons/selects that persist after workflow completion:
257
+
258
+ 1. Enable **Persistent** option in Send node
259
+ 2. Use **Interaction** trigger type to handle clicks
260
+ 3. Reference the **Message ID** to update existing messages
261
+
262
+ ### Chaining Prompts
263
+
264
+ Create multi-step dialogs:
265
+
266
+ 1. Send initial prompt with buttons
267
+ 2. Use response to determine next prompt
268
+ 3. Chain multiple Send nodes for complex flows
269
+
270
+ ### Voice Channel Integration
271
+
272
+ Play audio in voice channels:
273
+
274
+ 1. Use **Voice** type with **Join** action
275
+ 2. Use **Play** action with audio URL
276
+ 3. Supports YouTube, direct URLs, and streams
277
+
278
+ ## 🐛 Troubleshooting
279
+
280
+ ### Common Issues
281
+
282
+ **Bot not responding:**
283
+ - Ensure bot has proper permissions
284
+ - Check that intents are enabled in Developer Portal
285
+ - Verify credentials are correct
286
+
287
+ **Commands not showing:**
288
+ - Commands may take up to 1 hour to propagate
289
+ - Try using guild-specific commands for testing
290
+ - Ensure `applications.commands` scope is selected
291
+
292
+ **Voice not working:**
293
+ - Install required dependencies: `@discordjs/opus`, `@discordjs/voice`
294
+ - Ensure bot has voice permissions
295
+ - Check that voice channel is accessible
296
+
297
+ **Missing icon:**
298
+ - Restart n8n after installation
299
+ - Clear browser cache
300
+
301
+ ### Debug Mode
302
+
303
+ Enable test mode for debugging:
304
+ 1. Use `/test true` command
305
+ 2. Triggers will use test webhook URLs
306
+ 3. Use "Fetch Test Event" in n8n to capture events
307
+
308
+ ## 📸 Screenshots
309
+
310
+ ![Trigger Node](images/screen-1.png)
311
+ ![Send Node](images/screen-2.png)
312
+ ![Embed Example](images/embed.png)
313
+
314
+ ## 🤝 Contributing
315
+
316
+ Contributions are welcome! Please feel free to submit a Pull Request.
317
+
318
+ 1. Fork the repository
319
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
320
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
321
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
322
+ 5. Open a Pull Request
323
+
324
+ ## 📄 License
325
+
326
+ MIT License
327
+
328
+ Copyright (c) 2024-2026 lucifer6661771 (Discord)
329
+
330
+ Permission is hereby granted, free of charge, to any person obtaining a copy
331
+ of this software and associated documentation files (the "Software"), to deal
332
+ in the Software without restriction, including without limitation the rights
333
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
334
+ copies of the Software, and to permit persons to whom the Software is
335
+ furnished to do so, subject to the following conditions:
336
+
337
+ The above copyright notice and this permission notice shall be included in all
338
+ copies or substantial portions of the Software.
339
+
340
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
341
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
342
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
343
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
344
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
345
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
346
+ SOFTWARE.
347
+
348
+ ## 🙏 Acknowledgments
349
+
350
+ - Original work by [edbrdi](https://github.com/edbrdi)
351
+ - Contributions by [kmcbride3](https://github.com/Raaid17)
352
+ - Built with [Discord.js](https://discord.js.org/)
353
+ - Powered by [n8n](https://n8n.io/)
354
+
355
+ ---
356
+
357
+ **Made with ❤️ by lucifer6661771 (Discord)**
@@ -0,0 +1,7 @@
1
+ import { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class DiscordApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DiscordApi = void 0;
4
+ class DiscordApi {
5
+ constructor() {
6
+ this.name = 'discordApi';
7
+ this.displayName = 'Discord App';
8
+ this.documentationUrl = 'https://github.com/lucifer6661771/@lucifer666/@lucifer666/lucifer666/discordbotManager';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Client ID',
12
+ name: 'clientId',
13
+ description: 'The OAuth2 client ID of the Discord App. Found in the Discord Developer Portal under OAuth2.',
14
+ type: 'string',
15
+ default: '',
16
+ required: true,
17
+ },
18
+ {
19
+ displayName: 'Bot Token',
20
+ name: 'token',
21
+ description: 'The bot token of the Discord App. Found in the Discord Developer Portal under Bot. Keep this secret!',
22
+ type: 'string',
23
+ typeOptions: {
24
+ password: true,
25
+ },
26
+ default: '',
27
+ required: true,
28
+ },
29
+ {
30
+ displayName: 'n8n API Key',
31
+ name: 'apiKey',
32
+ description: 'The API key of the n8n server. Found in Settings > n8n API.',
33
+ type: 'string',
34
+ typeOptions: {
35
+ password: true,
36
+ },
37
+ default: '',
38
+ required: true,
39
+ },
40
+ {
41
+ displayName: 'Base URL',
42
+ name: 'baseUrl',
43
+ description: 'The API URL of the n8n instance (e.g., https://n8n.example.com/api/v1)',
44
+ type: 'string',
45
+ default: '',
46
+ placeholder: 'https://n8n.example.com/api/v1',
47
+ required: true,
48
+ },
49
+ {
50
+ displayName: 'Guild ID (Optional)',
51
+ name: 'guildId',
52
+ description: 'The ID of the Discord server (guild) to use. If not set, the bot will use the first guild it joins. Required for guild-specific slash commands.',
53
+ type: 'string',
54
+ default: '',
55
+ required: false,
56
+ },
57
+ {
58
+ displayName: 'Register Commands Globally',
59
+ name: 'globalCommands',
60
+ description: 'If enabled, slash commands will be registered globally (available in all servers). If disabled, commands are registered only in the specified guild (faster updates).',
61
+ type: 'boolean',
62
+ default: false,
63
+ required: false,
64
+ },
65
+ {
66
+ displayName: 'Debug Mode',
67
+ name: 'debugMode',
68
+ description: 'Enable verbose logging for troubleshooting. Logs will be visible in the n8n console.',
69
+ type: 'boolean',
70
+ default: false,
71
+ required: false,
72
+ },
73
+ ];
74
+ }
75
+ }
76
+ exports.DiscordApi = DiscordApi;
77
+ //# sourceMappingURL=DiscordApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscordApi.credentials.js","sourceRoot":"","sources":["../../src/credentials/DiscordApi.credentials.ts"],"names":[],"mappings":";;;AAUA,MAAa,UAAU;IAAvB;QACE,SAAI,GAAG,YAAY,CAAA;QAEnB,gBAAW,GAAG,aAAa,CAAA;QAE3B,qBAAgB,GAAG,wFAAwF,CAAA;QAE3G,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,8FAA8F;gBAC3G,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,sGAAsG;gBACnH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;gBAC1E,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,wEAAwE;gBACrF,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,gCAAgC;gBAC7C,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,qBAAqB;gBAClC,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,iJAAiJ;gBAC9J,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,WAAW,EAAE,4BAA4B;gBACzC,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,uKAAuK;gBACpL,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,sFAAsF;gBACnG,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF,CAAA;IACH,CAAC;CAAA;AAxED,gCAwEC"}
@@ -0,0 +1,3 @@
1
+ export * from './credentials/DiscordApi.credentials';
2
+ export * from './nodes/Discord/Discord.node';
3
+ export * from './nodes/Discord/DiscordTrigger.node';
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./credentials/DiscordApi.credentials"), exports);
18
+ __exportStar(require("./nodes/Discord/Discord.node"), exports);
19
+ __exportStar(require("./nodes/Discord/DiscordTrigger.node"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,uEAAoD;AACpD,+DAA4C;AAC5C,sEAAmD"}
@@ -0,0 +1,93 @@
1
+ import { ICredentialsDecrypted, ICredentialTestFunctions, IExecuteFunctions, ILoadOptionsFunctions, INodeCredentialTestResult, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export interface IDiscordNodeMessageParameters {
3
+ executionId: string;
4
+ triggerPlaceholder: boolean;
5
+ triggerChannel: boolean;
6
+ channelId: string;
7
+ embed: boolean;
8
+ title: string;
9
+ description: string;
10
+ url: string;
11
+ color: string;
12
+ timestamp: string;
13
+ footerText: string;
14
+ footerIconUrl: string;
15
+ imageUrl: string;
16
+ thumbnailUrl: string;
17
+ authorName: string;
18
+ authorIconUrl: string;
19
+ authorUrl: string;
20
+ fields: {
21
+ field?: {
22
+ name: string;
23
+ value: string;
24
+ inline: boolean;
25
+ }[];
26
+ };
27
+ mentionRoles: string[];
28
+ content: string;
29
+ files: {
30
+ file?: {
31
+ url: string;
32
+ }[];
33
+ };
34
+ }
35
+ export interface IDiscordNodePromptParameters {
36
+ executionId: string;
37
+ triggerPlaceholder: boolean;
38
+ triggerChannel: boolean;
39
+ channelId: string;
40
+ mentionRoles: string[];
41
+ content: string;
42
+ timeout: number;
43
+ placeholder: string;
44
+ apiKey: string;
45
+ baseUrl: string;
46
+ buttons: {
47
+ button?: {
48
+ value: string;
49
+ label: string;
50
+ style: number;
51
+ }[];
52
+ };
53
+ select: {
54
+ select?: {
55
+ value: string;
56
+ label: string;
57
+ description: string;
58
+ }[];
59
+ };
60
+ persistent: boolean;
61
+ minSelect: number;
62
+ maxSelect: number;
63
+ updateMessageId: string;
64
+ }
65
+ export interface IDiscordNodeActionParameters {
66
+ executionId: string;
67
+ triggerPlaceholder: boolean;
68
+ triggerChannel: boolean;
69
+ channelId: string;
70
+ apiKey: string;
71
+ baseUrl: string;
72
+ actionType: string;
73
+ removeMessagesNumber: number;
74
+ userId?: string;
75
+ roleUpdateIds?: string[] | string;
76
+ auditLogReason: string;
77
+ }
78
+ export declare class Discord implements INodeType {
79
+ description: INodeTypeDescription;
80
+ methods: {
81
+ loadOptions: {
82
+ getChannels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
83
+ getRoles(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
84
+ getVoiceChannels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
85
+ };
86
+ credentialTest: {
87
+ discordApiTest: typeof discordApiTest;
88
+ };
89
+ };
90
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
91
+ }
92
+ declare function discordApiTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
93
+ export {};