diff --git a/.pnpm-debug.log b/.pnpm-debug.log new file mode 100644 index 0000000..2126530 --- /dev/null +++ b/.pnpm-debug.log @@ -0,0 +1,20 @@ +{ + "0 debug pnpm:scope": { + "selected": 1 + }, + "1 error pnpm": { + "errno": 1, + "code": "ELIFECYCLE", + "pkgid": "demoncord-plugin-template@1.0.0", + "stage": "build", + "script": "rollup --config rollup.config.js", + "pkgname": "demoncord-plugin-template", + "err": { + "name": "pnpm", + "message": "demoncord-plugin-template@1.0.0 build: `rollup --config rollup.config.js`\nExit status 1", + "code": "ELIFECYCLE", + "stack": "pnpm: demoncord-plugin-template@1.0.0 build: `rollup --config rollup.config.js`\nExit status 1\n at EventEmitter. (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:103873:20)\n at EventEmitter.emit (node:events:527:28)\n at ChildProcess. (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:91802:18)\n at ChildProcess.emit (node:events:527:28)\n at maybeClose (node:internal/child_process:1090:16)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)" + } + }, + "2 warn pnpm:global": " Local package.json exists, but node_modules missing, did you mean to install?" +} \ No newline at end of file diff --git a/dist/plugin.js b/dist/plugin.js index 56d31f3..d610beb 100644 --- a/dist/plugin.js +++ b/dist/plugin.js @@ -1 +1 @@ -(function(){"use strict";function l(o){o.hello="Hello, world!",o.command=demon.commands.add({name:"plugin",callback:n=>"Hello, world!"})}function e(o){console.log(o.hello.replace("Hello","Goodbye")),o.command()}var a={onStart:l,onStop:e,metadata:{name:"Example plugin",desc:"Example description",author:"Example author",cumcord:!1}};return a})(); +(function(){"use strict";function n(e){const o=demon.webpack.findByProps("createPendingReply");e.unpatch=demon.patcher.before("createPendingReply",o,r=>{r[0].shouldMention=!1})}function t(e){e.unpatch()}var a={onStart:n,onStop:t,metadata:{name:"noReplyMention",desc:"Disable reply pings by default. (Cumcord port)",author:"Drake",cumcord:!1}};return a})(); diff --git a/src/index.js b/src/index.js index 5147fd6..205e736 100644 --- a/src/index.js +++ b/src/index.js @@ -1,18 +1,19 @@ function onStart(ctx) { - ctx["hello"] = "Hello, world!" //ctx is an empty object used for passing data between onStart and onStop - ctx["command"] = demon.commands.add({name: "plugin", callback: (args)=>"Hello, world!"}) + const createPendingReply = demon.webpack.findByProps("createPendingReply") + ctx["unpatch"] = demon.patcher.before("createPendingReply", createPendingReply, (args) => { + args[0].shouldMention = false + }) } function onStop(ctx) { - console.log(ctx["hello"].replace("Hello", "Goodbye")) - ctx["command"]() + ctx["unpatch"]() } export default { onStart, onStop, metadata: { - name: "Example plugin", - desc: "Example description", - author: "Example author", + name: "noReplyMention", + desc: "Disable reply pings by default. (Cumcord port)", + author: "Drake", cumcord: false } }