mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 15:15:02 +00:00
10 lines
426 B
TypeScript
10 lines
426 B
TypeScript
import { GuildPluginData } from "knub";
|
|
import { ReactionRolesPluginType } from "../types.js";
|
|
import { runAutoRefresh } from "./runAutoRefresh.js";
|
|
|
|
export async function autoRefreshLoop(pluginData: GuildPluginData<ReactionRolesPluginType>, interval: number) {
|
|
pluginData.state.autoRefreshTimeout = setTimeout(async () => {
|
|
await runAutoRefresh(pluginData);
|
|
autoRefreshLoop(pluginData, interval);
|
|
}, interval);
|
|
}
|