mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-20 11:57:02 -04:00
allow plugins to specify how soon their start() method is called
This commit is contained in:
parent
074ebae334
commit
371b5b0be8
4 changed files with 38 additions and 24 deletions
|
@ -80,6 +80,11 @@ export interface PluginDef {
|
|||
* Whether this plugin should be enabled by default, but can be disabled
|
||||
*/
|
||||
enabledByDefault?: boolean;
|
||||
/**
|
||||
* When to call the start() method
|
||||
* @default StartAt.WebpackReady
|
||||
*/
|
||||
startAt?: StartAt,
|
||||
/**
|
||||
* Optionally provide settings that the user can configure in the Plugins tab of settings.
|
||||
* @deprecated Use `settings` instead
|
||||
|
@ -117,6 +122,15 @@ export interface PluginDef {
|
|||
tags?: string[];
|
||||
}
|
||||
|
||||
export const enum StartAt {
|
||||
/** Right away, as soon as Vencord initialised */
|
||||
Init = "Init",
|
||||
/** On the DOMContentLoaded event, so once the document is ready */
|
||||
DOMContentLoaded = "DOMContentLoaded",
|
||||
/** Once Discord's core webpack modules have finished loading, so as soon as things like react and flux are available */
|
||||
WebpackReady = "WebpackReady"
|
||||
}
|
||||
|
||||
export const enum OptionType {
|
||||
STRING,
|
||||
NUMBER,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue