Fix error on cooldown check in SelfGrantableRolesPlugin

This commit is contained in:
Dragory 2020-07-29 00:48:51 +03:00
parent a658ec06e7
commit 4a6f28b17b
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
2 changed files with 10 additions and 3 deletions
backend/src/plugins/SelfGrantableRoles

View file

@ -1,4 +1,4 @@
import { PluginOptions } from "knub";
import { CooldownManager, PluginOptions } from "knub";
import { SelfGrantableRolesPluginType, ConfigSchema, defaultSelfGrantableRoleEntry } from "./types";
import { zeppelinPlugin } from "../ZeppelinPluginBlueprint";
import { trimPluginDescription } from "src/utils";
@ -91,5 +91,9 @@ export const SelfGrantableRolesPlugin = zeppelinPlugin<SelfGrantableRolesPluginT
RoleHelpCmd,
RoleRemoveCmd,
RoleAddCmd,
]
],
onLoad(pluginData) {
pluginData.state.cooldowns = new CooldownManager();
},
});