mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-19 08:05:01 +00:00
Migrate LocateUser to new Plugin structure
This commit is contained in:
parent
ef1b993d58
commit
7b191093b3
16 changed files with 380 additions and 0 deletions
12
backend/src/plugins/LocateUser/events/GuildBanAddEvt.ts
Normal file
12
backend/src/plugins/LocateUser/events/GuildBanAddEvt.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
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);
|
||||
});
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue