-
-
Save rauenzi/e5f4d02fc3085a53872b0236cd6f8225 to your computer and use it in GitHub Desktop.
/** | |
* @name ExamplePlugin | |
* @author YourName | |
* @description Describe the basic functions. Maybe a support server link. | |
* @version 0.0.1 | |
* @invite inviteCode | |
* @authorId 51512151151651 | |
* @authorLink https://twitter.com/Whoever | |
* @donate https://paypal.me/ | |
* @patreon https://patreon.com/ | |
* @website https://github.com/rauenzi/BetterDiscordApp | |
* @source https://gist.github.com/rauenzi/e5f4d02fc3085a53872b0236cd6f8225 | |
*/ | |
module.exports = class ExamplePlugin { | |
load() {} // Optional function. Called when the plugin is loaded in to memory | |
start() {} // Required function. Called when the plugin is activated (including after reloads) | |
stop() {} // Required function. Called when the plugin is deactivated | |
observer(changes) {} // Optional function. Observer for the `document`. Better documentation than I can provide is found here: <https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver> | |
} |
gg
my journey begins ;p
my journey begins ;p
My too
it dont works
Yea the plugin template doesn't even work. It errors saying (0, e.exports) is not a constructor
. Here is my full code (taken from this gist):
/**
* @name CreationDates
* @version 0.0.1
* @description Right click on users, messages, reactions, etc to get their creation date (based on id).
* @author avocado
*/
module.exports = class CreationDates {
start() {
showToast("CreationDates plugin loaded!", {type:"success", icon: true});
}
stop() {
showToast("CreationDates plugin stopped.", {type:"info", icon: true});
}
};
Try reloading with ctrl+r
. Also showToast
is not defined there
alr lets see if we can make something
my journey begins ;p
same here UwU
it dont works
Because it's a template with no functions?
@avocado5182 I'm getting this error when I try enabling it
@avocado5182
BdApi.showToast() is the only toast.
/**
- @name CreationDates
- @Version 0.0.1
- @description Right click on users, messages, reactions, etc to get their creation date (based on id).
- @author avocado
*/
module.exports = class CreationDates {
start() {
BdApi.showToast("CreationDates plugin loaded!", {type:"success", icon: true});
}
stop() {
BdApi.showToast("CreationDates plugin stopped.", {type:"info", icon: true});
}
};
Oh also now its modules.export I'm pretty sure.
it is module.exports
in es6 there is export default x or export {y,z}, but es6 modules and require() are not compatible
thank you