3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 22:05:01 +00:00

feat: update knub; update public interfaces for new knub

This commit is contained in:
Dragory 2024-03-30 13:31:30 +00:00
parent c2ae6d53d8
commit c89c5ea430
No known key found for this signature in database
15 changed files with 193 additions and 241 deletions

View file

@ -1,7 +1,7 @@
import { guildPlugin } from "knub";
import z from "zod";
import { GuildMemberCache } from "../../data/GuildMemberCache";
import { mapToPublicFn } from "../../pluginUtils";
import { makePublicFn } from "../../pluginUtils";
import { SECONDS } from "../../utils";
import { cancelDeletionOnMemberJoin } from "./events/cancelDeletionOnMemberJoin";
import { removeMemberCacheOnMemberLeave } from "./events/removeMemberCacheOnMemberLeave";
@ -28,8 +28,10 @@ export const GuildMemberCachePlugin = guildPlugin<GuildMemberCachePluginType>()(
cancelDeletionOnMemberJoin,
],
public: {
getCachedMemberData: mapToPublicFn(getCachedMemberData),
public(pluginData) {
return {
getCachedMemberData: makePublicFn(pluginData, getCachedMemberData),
};
},
beforeLoad(pluginData) {