diff --git a/src/index.js b/src/index.js index 205e736..d8a0c70 100644 --- a/src/index.js +++ b/src/index.js @@ -1,19 +1,21 @@ -function onStart(ctx) { - const createPendingReply = demon.webpack.findByProps("createPendingReply") - ctx["unpatch"] = demon.patcher.before("createPendingReply", createPendingReply, (args) => { +const { findByProps } = demon.summon("modules/webpack") +const { before } = demon.summon("patcher") + +function onStart() { + const createPendingReply = findByProps("createPendingReply") + const unpatch = before("createPendingReply", createPendingReply, (args) => { args[0].shouldMention = false }) + return { + unpatch + } } + function onStop(ctx) { - ctx["unpatch"]() + ctx.unpatch() } + export default { onStart, - onStop, - metadata: { - name: "noReplyMention", - desc: "Disable reply pings by default. (Cumcord port)", - author: "Drake", - cumcord: false - } + onStop }