Releases: Markoudstaal/node-red-contrib-discord-advanced
v3.6.0 New nodes
v3.5.2 Showing Modals
- Feature - Modals!!!!!. In order to handle modal interactions, discordInteraction lets choose between defer reply or "do nothing". "Do nothing" lets you show showModals for commands interactions.
- Feature - DiscordInteractionManager can reply "non replied interactions". This features connects with "do nothing" options in discordInteraction.
- Notes: Important!! When a interaction is handled by discordinteraction and "do nothing" options is checked, the interactions needs to be respond in 3 seconds
Modals example:
[
{
"id": "ebf3f9055a4cd75f",
"type": "discordInteraction",
"z": "ee8066c7e5f4a392",
"name": "Modal submit",
"token": "",
"interactionType": "modalSubmit",
"custom_id": "modal23",
"commandResponse": "Command in proccess, wait a moment...",
"interactionObject": false,
"ephemeral": false,
"responseType": "update",
"commandResponseType": "defersReply",
"x": 170,
"y": 440,
"wires": [
[
"cde18eeacd74a112"
]
]
},
{
"id": "fe35044643ef8e2a",
"type": "discordInteractionManager",
"z": "ee8066c7e5f4a392",
"name": "",
"token": "",
"x": 800,
"y": 400,
"wires": [
[]
]
},
{
"id": "6db870a14cb03171",
"type": "function",
"z": "ee8066c7e5f4a392",
"name": "Send Modal",
"func": "let newMessage = {};\nnewMessage.interactionId = msg.payload.id;\nnewMessage.customId= \"modal23\";\nnewMessage.action= \"showModal\";\nnewMessage.payload = {\n content: \"Jenn modal\",\n components: \n [\n {\n \"type\": 1,\n \"components\": [{\n \"type\": 4,\n \"custom_id\": \"name\",\n \"label\": \"Name\",\n \"style\": 1\n // \"min_length\": 1,\n // \"max_length\": 4000,\n // \"placeholder\": \"John\",\n // \"required\": true\n }]\n }\n ]\n};\n\nreturn newMessage;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 430,
"y": 400,
"wires": [
[
"fe35044643ef8e2a"
]
]
},
{
"id": "cde18eeacd74a112",
"type": "function",
"z": "ee8066c7e5f4a392",
"name": "Reply Modal",
"func": "let newMessage = {};\nnewMessage.interactionId = msg.payload.id;\nnewMessage.payload = {\n content: \"Name filled value \"+ msg.payload.components[0].components[0].value,\n};\n\nreturn newMessage;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 430,
"y": 440,
"wires": [
[
"fd5199e0961ff4c6"
]
]
},
{
"id": "d5cea7ebb208ea2b",
"type": "comment",
"z": "ee8066c7e5f4a392",
"name": "discordInteraction Do not reply.",
"info": "",
"x": 310,
"y": 360,
"wires": []
},
{
"id": "72aae0031432d0ac",
"type": "discordInteraction",
"z": "ee8066c7e5f4a392",
"name": "echo2 Slash Command",
"token": "",
"interactionType": "command",
"custom_id": "echo2",
"commandResponse": "Command in proccess, wait a moment...",
"interactionObject": false,
"ephemeral": false,
"responseType": "update",
"commandResponseType": "nothing",
"x": 140,
"y": 400,
"wires": [
[
"6db870a14cb03171"
]
]
},
{
"id": "5ab94a23306cee52",
"type": "comment",
"z": "ee8066c7e5f4a392",
"name": "only 3 seconds to show modal for interaction",
"info": "",
"x": 630,
"y": 360,
"wires": []
},
{
"id": "fd5199e0961ff4c6",
"type": "discordInteractionManager",
"z": "ee8066c7e5f4a392",
"name": "",
"token": "",
"x": 800,
"y": 460,
"wires": [
[]
]
}
]
What's Changed
Full Changelog: v3.5.1...v3.5.2
3.5.1 DiscordTyping node
Merge pull request #107 from Markoudstaal/soriasmith-main Soriasmith main - Discord Typing changes
v3.5.0 DiscordInteractionManager **Breaking Changes**
Key migration points from 3.4.x to 3.5.0
Native behavior of discord interactions
When a command is sent by an user, discord displays messages like "Bot is thinking...". Versions < 3.4 of node-red-contrib-discord-advanced manage this interaction by replying with a default text message. From 3.5.0, this library always defers replies and updates, keeping in memory the reference to the interaction in order to interact moments later within the flow with the new node discordInteractionManager.
Replacing discordMessageManager for discordInteractionManager
Now all interactions are replied with discordInteractionManager node, so there are several scenarios for having in mind. This is a breaking change. It's mandatory to take a look on examples to prevent breaking flows.
3.4.5 discordMember and discordChannelName added
- Hotfix - DiscordPermission try/catch for nodered crash prevention.
- Feature - New node to change the channel name (discordChannelName).
- Feature - New node to guildMemberAdd & guildMemberRemove events (discordMember).
- Feature - Add the Intent GuildMembers.
- Feature - Add a simple way to use the discordActivity (Node editor window parameters).
- Feature - Add reaction remove on discordReactionManager.
3.4.4 fix discordActivity payload output
v3.4.4 Merge pull request #87 from Markoudstaal/79-cant-set-bot-status-with-…
Moves to Discord.js 14.11.0
Hotfix - #85 TypeError: channel.isTextBased is not a function Move to Discord.js 14.11.0
DiscordActivity node
DiscordActivity lets you to set bot activity and status
3.4.1 AutoSharding enabled
AutoSharding enabled
3.4.0 Moving to Discord.js 14.7.1
- Enhancement - Moving to Discord.js 14.7.
- Hotfix - Mantain same functionality when editing messages (Overrides all fields: embed, components, attachments) after change discord.js version 14.7.1.
- Feature - Attachments from buffer added.
- Feature - Add and remove roles from users.
- Feature - Crosspost an existing message or crosspost a new message on an announcement channel.