diff --git a/src/functions/event/interactionEdit.js b/src/functions/event/interactionEdit.js index e9f7ffd7a..9ca0b75d2 100644 --- a/src/functions/event/interactionEdit.js +++ b/src/functions/event/interactionEdit.js @@ -2,7 +2,7 @@ module.exports = async d => { const data = d.util.aoiFunc(d); if (data.err) return d.error(data.err); - let [content = "", embeds = "", components = "", files = ""] = data.inside.splits; + let [content = "", embeds = "", components = "", files = "", allowedMentions = "all"] = data.inside.splits; const Checker = (theparts, name) => theparts.includes("{" + name + ":"); @@ -12,14 +12,20 @@ module.exports = async d => { files = await d.util.parsers.parsers.FileParser.code(d, { part: files, Checker }); - await d.data.interaction?.update({ - content: content.trim() === "" ? " " : content.addBrackets(), - embeds: embeds, - components: components, - files - }).catch(e => { + allowedMentions = allowedMentions === "all" ? ["everyone", "users", "roles"] : allowedMentions?.split(",") || []; + + await d.data.interaction?.editReply({ + content: content.trim() === "" ? " " : content.addBrackets(), + embeds: embeds, + components: components, + files, + allowedMentions: { + parse: allowedMentions + } + } + ).catch(e => { d.aoiError.fnError(d, 'custom', {}, 'Failed To Reply With Reason: ' + e) - }) + }); return { code: d.util.setCode(data)