3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-19 16:05:01 +00:00
zeppelin/backend/src/plugins/LocateUser/events/GuildBanAddEvt.ts

12 lines
335 B
TypeScript

import { locateUserEvent } from "../types";
export const GuildBanAddEvt = locateUserEvent({
event: "guildBanAdd",
async listener(meta) {
const alerts = await meta.pluginData.state.alerts.getAlertsByUserId(meta.args.user.id);
alerts.forEach(alert => {
meta.pluginData.state.alerts.delete(alert.id);
});
},
});