3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-08 11:37:20 +00:00

refactor: move defaults to config schemas

This commit is contained in:
Dragory 2025-05-23 01:12:52 +00:00
parent 09eb8e92f2
commit 83d35052c3
No known key found for this signature in database
91 changed files with 450 additions and 888 deletions

View file

@ -1,5 +1,4 @@
import { guildPlugin } from "knub";
import z from "zod/v4";
import { GuildMemberCache } from "../../data/GuildMemberCache.js";
import { makePublicFn } from "../../pluginUtils.js";
import { SECONDS } from "../../utils.js";
@ -10,14 +9,14 @@ import { updateMemberCacheOnMessage } from "./events/updateMemberCacheOnMessage.
import { updateMemberCacheOnRoleChange } from "./events/updateMemberCacheOnRoleChange.js";
import { updateMemberCacheOnVoiceStateUpdate } from "./events/updateMemberCacheOnVoiceStateUpdate.js";
import { getCachedMemberData } from "./functions/getCachedMemberData.js";
import { GuildMemberCachePluginType } from "./types.js";
import { GuildMemberCachePluginType, zGuildMemberCacheConfig } from "./types.js";
const PENDING_SAVE_INTERVAL = 30 * SECONDS;
export const GuildMemberCachePlugin = guildPlugin<GuildMemberCachePluginType>()({
name: "guild_member_cache",
configParser: (input) => z.strictObject({}).parse(input),
configSchema: zGuildMemberCacheConfig,
events: [
updateMemberCacheOnMemberUpdate,