feat: add member cache; handle all role changes with RoleManagerPlugin; exit gracefully

This commit is contained in:
Dragory 2023-05-07 17:56:55 +03:00
parent fd60a09947
commit fa50110766
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
48 changed files with 755 additions and 264 deletions

View file

@ -0,0 +1,9 @@
import { guildPluginEventListener } from "knub";
import { GuildMemberCachePluginType } from "../types";
export const cancelDeletionOnMemberJoin = guildPluginEventListener<GuildMemberCachePluginType>()({
event: "guildMemberAdd",
async listener({ pluginData, args: { member } }) {
pluginData.state.memberCache.unmarkMemberForDeletion(member.id);
},
});