Lightcord/LightcordApi/pluginExemple.plugin.js

40 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-06-10 16:16:33 +02:00
/**
* @name LightcordApiExemple
*/
module.exports = class LightcordApiExemple {
2020-06-16 15:51:21 +02:00
getName() {return "LightcordApiExemple";} // Name of your plugin to show on the plugins page
2020-06-10 16:16:33 +02:00
getDescription() {return "Describe the basic functions. Maybe a support server link.";} // Description to show on the plugins page
getVersion() {return "0.0.1";} // Current version. I recommend following semantic versioning <http://semver.org/> (e.g. 0.0.1)
getAuthor() {return "Not Thomiz";} // Your name
load() {} // Called when the plugin is loaded in to memory
start() {
if(!("Lightcord" in window) || !("Api" in window.Lightcord)){
bdApi.showToast("This plugin only works in Lightcord.")
return
}
console.log(`LightcordAPI is availaible !`)
} // Called when the plugin is activated (including after reloads)
stop() {} // Called when the plugin is deactivated
observer(changes) {} // Observer for the `document`. Better documentation than I can provide is found here: <https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver>
2020-06-16 15:51:21 +02:00
getSettingsPanel(){
let settings = [
{
component: "inputs.Button",
props: {
children: [
"sltsv"
],
color: "red"
}
}
]
return windows.Lightcord.Api.Utils.PluginUtils.renderSettings(settings)
}
2020-06-10 16:16:33 +02:00
}