feat: check for new quests, post result embed to discord webhook and cache posted quests
This commit is contained in:
15
src/index.ts
15
src/index.ts
@@ -1 +1,14 @@
|
||||
console.log("Hello via Bun!");
|
||||
import { postEmbed } from "./discord";
|
||||
import { env } from "./env";
|
||||
import { checkForNewQuest } from "./wov";
|
||||
|
||||
const fn = async () => {
|
||||
const quest = await checkForNewQuest();
|
||||
if (quest) {
|
||||
await postEmbed(quest);
|
||||
console.log(`Quest result posted at: ${new Date().toISOString()}`);
|
||||
}
|
||||
};
|
||||
|
||||
await fn();
|
||||
setInterval(fn, env.WOV_FETCH_INTERVAL);
|
||||
|
||||
Reference in New Issue
Block a user