zappyzep/backend/src/plugins/LocateUser/utils/removeUserIdFromActiveAlerts.ts
2024-04-09 20:57:18 +03:00

9 lines
360 B
TypeScript

import { GuildPluginData } from "knub";
import { LocateUserPluginType } from "../types.js";
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);
}
}