3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-12 05:27:19 +00:00

Migrate LocateUser to new Plugin structure

This commit is contained in:
Dark 2020-07-08 02:53:44 +02:00
parent ef1b993d58
commit 7b191093b3
16 changed files with 380 additions and 0 deletions

View file

@ -0,0 +1,22 @@
import { locateUserEvent } from "../types";
import { sendAlerts } from "../utils/sendAlerts";
export const ChannelJoinEvt = locateUserEvent({
event: "voiceChannelJoin",
async listener(meta) {
if (meta.pluginData.state.usersWithAlerts.includes(meta.args.member.id)) {
sendAlerts(meta.pluginData, meta.args.member.id);
}
},
});
export const ChannelSwitchEvt = locateUserEvent({
event: "voiceChannelSwitch",
async listener(meta) {
if (meta.pluginData.state.usersWithAlerts.includes(meta.args.member.id)) {
sendAlerts(meta.pluginData, meta.args.member.id);
}
},
});