[ { "id": "653680fa75bf1fca", "type": "discordInteraction", "z": "ee8066c7e5f4a392", "name": "Button Interaction option1", "token": "", "interactionType": "button", "custom_id": "click_opt1", "commandResponse": "", "interactionObject": false, "ephemeral": false, "responseType": "reply", "x": 130, "y": 360, "wires": [ [ "31371305b08a08df", "bfa8a9cd9f74a5d5", "db69b30385a94bb7" ] ] }, { "id": "31371305b08a08df", "type": "function", "z": "ee8066c7e5f4a392", "name": "Edit reply", "func": "let newMessage = {};\nnewMessage.action = \"edit\";\nnewMessage.payload = {\n \"content\": `Thanks for clicking option *${msg.payload.customId}*, <@!${msg.payload.user.id}>`,\n \"embed\": {\n \"title\": `Toyota Etios`,\n \"description\": `Compact Car`,\n \"color\": 0x00FFFF,\n \"fields\": [\n {\n \"name\": `Type`,\n \"value\": `Hatch`\n }]\n }\n};\n\nnewMessage.interactionId = msg.payload.id;\nreturn newMessage;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 340, "y": 360, "wires": [ [ "7195f9ac2cea8654" ] ] }, { "id": "7195f9ac2cea8654", "type": "discordInteractionManager", "z": "ee8066c7e5f4a392", "name": "", "token": "", "x": 600, "y": 360, "wires": [ [] ] }, { "id": "bfa8a9cd9f74a5d5", "type": "function", "z": "ee8066c7e5f4a392", "name": "EditReply original interaction", "func": "let newMessage = {};\nnewMessage.payload = {\n content: \"Deleted\",\n components: []\n};\nnewMessage.interactionId = msg.payload.message.interaction.id;\nreturn newMessage;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 400, "y": 480, "wires": [ [ "a46c65a59ab2ece4" ] ] }, { "id": "a46c65a59ab2ece4", "type": "discordInteractionManager", "z": "ee8066c7e5f4a392", "name": "", "token": "", "x": 680, "y": 480, "wires": [ [] ] }, { "id": "db69b30385a94bb7", "type": "debug", "z": "ee8066c7e5f4a392", "name": "debug 14", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 360, "y": 540, "wires": [] }, { "id": "4606835f6e815b08", "type": "comment", "z": "ee8066c7e5f4a392", "name": "Interaction: reply buttom interaction", "info": "", "x": 420, "y": 320, "wires": [] }, { "id": "1309aa38f956357c", "type": "comment", "z": "ee8066c7e5f4a392", "name": "Interaction: delete buttoms from first reply", "info": "", "x": 440, "y": 440, "wires": [] }, { "id": "1b70aeaea2657335", "type": "discordInteraction", "z": "ee8066c7e5f4a392", "name": "Button Interaction option 2", "token": "", "interactionType": "button", "custom_id": "click_opt2", "commandResponse": "", "interactionObject": false, "ephemeral": false, "responseType": "update", "x": 130, "y": 600, "wires": [ [ "f4ab1c891d6b04c8" ] ] }, { "id": "f4ab1c891d6b04c8", "type": "function", "z": "ee8066c7e5f4a392", "name": "Edit reply", "func": "let newMessage = {};\nnewMessage.payload = `Thanks for clicking option *${msg.payload.customId}*, <@!${msg.payload.user.id}>`;\nnewMessage.action = \"edit\";\nnewMessage.message = msg.payload.message.id;\nnewMessage.channel = msg.payload.message.channelId;\n// newMessage.components = msg.payload.message.components\n// newMessage.components[0].components[1].label = \"Label editado 2\";\n\nreturn newMessage;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 360, "y": 600, "wires": [ [ "3959e2b5f2991020" ] ] }, { "id": "3959e2b5f2991020", "type": "discordMessageManager", "z": "ee8066c7e5f4a392", "name": "", "channel": "", "token": "", "x": 630, "y": 600, "wires": [ [] ] } ]