mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 18:37:04 -04:00
feat: auto-managed flux subscriptions via plugin.flux (#959)
This commit is contained in:
parent
c6f0c84935
commit
63fc354d48
10 changed files with 210 additions and 253 deletions
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
import { Command } from "@api/Commands";
|
||||
import { FluxEvents } from "@webpack/types";
|
||||
import { Promisable } from "type-fest";
|
||||
|
||||
// exists to export default definePlugin({...})
|
||||
|
@ -101,6 +102,12 @@ export interface PluginDef {
|
|||
settingsAboutComponent?: React.ComponentType<{
|
||||
tempSettings?: Record<string, any>;
|
||||
}>;
|
||||
/**
|
||||
* Allows you to subscribe to Flux events
|
||||
*/
|
||||
flux?: {
|
||||
[E in FluxEvents]?: (event: any) => void;
|
||||
};
|
||||
}
|
||||
|
||||
export enum OptionType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue