From 2e330bbe1e0f91458590ab101093fb66cf3e6ead Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Mon, 11 Jul 2022 11:04:10 -0400 Subject: [PATCH] finally update this thing --- src/index.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) 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 }