Created
October 18, 2020 16:39
-
-
Save TheEpicFace007/7a16f6dc4b7ac012e91db157f4d4dad2 to your computer and use it in GitHub Desktop.
I use arch btw discord plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @name IUseArchBtw | |
* @authorLink https://github.com/ViniDalvino | |
* @source https://gist.github.com/ViniDalvino/7a16f6dc4b7ac012e91db157f4d4dad2 | |
*/ | |
module.exports = (() => { | |
const config = { | |
info: { | |
name: "IUseArchBtw", | |
authors: [{ | |
name: "ViniDalvino", | |
github_username: "ViniDalvino", | |
}], | |
version: "2.0", | |
description: "Finish every message you send with \"I use arch btw\"", | |
}, | |
changelog: [{ | |
title: "2.0", | |
type: "added", | |
items: [ | |
"Finish every message with \"I use arch btw\" to flex that you use the best operating system." | |
] | |
}] | |
}; | |
return (([Plugin, Api]) => { | |
const plugin = (Plugin, Api) => { | |
const { | |
DiscordModules, | |
Patcher | |
} = Api; | |
return class IUseArchBtw extends Plugin { | |
constructor() { | |
super(); | |
} | |
onStart() { | |
Patcher.after(DiscordModules.MessageActions, "sendMessage", (_, [, message]) => { | |
// console.log(message); | |
message.content += " I use arch btw"; | |
}); | |
} | |
onStop() { | |
Patcher.unpatchAll(); | |
} | |
} | |
}; | |
return plugin(Plugin, Api); | |
})(global.ZeresPluginLibrary.buildPlugin(config)); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment