mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-25 18:25:03 +00:00
perf: use a memory cache for Slowmode
This commit is contained in:
parent
d09d6b776a
commit
121628e6b1
5 changed files with 30 additions and 4 deletions
|
@ -42,7 +42,11 @@ export const SlowmodePlugin = zeppelinGuildPlugin<SlowmodePluginType>()({
|
|||
prettyName: "Slowmode",
|
||||
},
|
||||
|
||||
dependencies: () => [LogsPlugin],
|
||||
// prettier-ignore
|
||||
dependencies: () => [
|
||||
LogsPlugin,
|
||||
],
|
||||
|
||||
configSchema: ConfigSchema,
|
||||
defaultOptions,
|
||||
|
||||
|
@ -61,6 +65,7 @@ export const SlowmodePlugin = zeppelinGuildPlugin<SlowmodePluginType>()({
|
|||
state.slowmodes = GuildSlowmodes.getGuildInstance(guild.id);
|
||||
state.savedMessages = GuildSavedMessages.getGuildInstance(guild.id);
|
||||
state.logs = new GuildLogs(guild.id);
|
||||
state.channelSlowmodeCache = new Map();
|
||||
},
|
||||
|
||||
afterLoad(pluginData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue