Update to Knub30.0.0-beta.37 and Eris 0.15, first pass

This commit is contained in:
Dragory 2021-05-23 14:35:16 +03:00
parent 84da543205
commit f6be4f4af6
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
133 changed files with 6507 additions and 380 deletions

View file

@ -106,7 +106,8 @@ const configPreprocessor: ConfigPreprocessorFn<CountersPluginType> = options =>
* A single trigger can only trigger once per user/channel/in general, depending on how specific the counter is (e.g. a per-user trigger can only trigger once per user).
* After being triggered, a trigger is "reset" if the counter value no longer matches the trigger (e.g. drops to 100 or below in the above example). After this, that trigger can be triggered again.
*/
export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()("counters", {
export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()({
name: "counters",
showInDocs: true,
info: {
prettyName: "Counters",
@ -145,7 +146,7 @@ export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()("counter
ResetAllCounterValuesCmd,
],
async onLoad(pluginData) {
async afterLoad(pluginData) {
pluginData.state.counters = new GuildCounters(pluginData.guild.id);
pluginData.state.events = new EventEmitter();
pluginData.state.counterTriggersByCounterId = new Map();
@ -207,7 +208,7 @@ export const CountersPlugin = zeppelinGuildPlugin<CountersPluginType>()("counter
}
},
onUnload(pluginData) {
beforeUnload(pluginData) {
for (const interval of pluginData.state.decayTimers) {
clearInterval(interval);
}