mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 23:09:59 +00:00
12 lines
432 B
TypeScript
12 lines
432 B
TypeScript
import { GuildPluginData } from "knub";
|
|
import { LocateUserPluginType } from "../types";
|
|
|
|
export async function fillActiveAlertsList(pluginData: GuildPluginData<LocateUserPluginType>) {
|
|
const allAlerts = await pluginData.state.alerts.getAllGuildAlerts();
|
|
|
|
allAlerts.forEach(alert => {
|
|
if (!pluginData.state.usersWithAlerts.includes(alert.user_id)) {
|
|
pluginData.state.usersWithAlerts.push(alert.user_id);
|
|
}
|
|
});
|
|
}
|