3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 23:09:59 +00:00
zeppelin/backend/src/plugins/LocateUser/utils/removeUserIdFromActiveAlerts.ts
2020-10-01 01:43:38 +03:00

9 lines
357 B
TypeScript

import { GuildPluginData } from "knub";
import { LocateUserPluginType } from "../types";
export async function removeUserIdFromActiveAlerts(pluginData: GuildPluginData<LocateUserPluginType>, userId: string) {
const index = pluginData.state.usersWithAlerts.indexOf(userId);
if (index > -1) {
pluginData.state.usersWithAlerts.splice(index, 1);
}
}