mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-06 10:37:19 +00:00
feat: add member cache; handle all role changes with RoleManagerPlugin; exit gracefully
This commit is contained in:
parent
fd60a09947
commit
fa50110766
48 changed files with 755 additions and 264 deletions
|
@ -0,0 +1,12 @@
|
|||
import { guildPluginEventListener } from "knub";
|
||||
import { MINUTES } from "../../../utils";
|
||||
import { GuildMemberCachePluginType } from "../types";
|
||||
|
||||
const DELETION_DELAY = 2 * MINUTES;
|
||||
|
||||
export const removeMemberCacheOnMemberLeave = guildPluginEventListener<GuildMemberCachePluginType>()({
|
||||
event: "guildMemberRemove",
|
||||
async listener({ pluginData, args: { member } }) {
|
||||
pluginData.state.memberCache.markMemberForDeletion(member.id);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue