import { constructReadTangleUrl } from "https://esm.town/v/willthereader/constructReadTangleUrl";
import { fetchComments } from "https://esm.town/v/willthereader/fetchComments";
import { FilterCommentsVal } from "https://esm.town/v/willthereader/FilterCommentsVal";
import { formattingEmailContent } from "https://esm.town/v/willthereader/formattingEmailContent";
import { logMessage } from "https://esm.town/v/willthereader/logMessage";
import { post_idFetcher } from "https://esm.town/v/willthereader/post_idFetcher";
export async function Sendingemail() {
try {
let lastRunDate = new Date("2023-11-10T19:27:25.547Z");
lastRunDate = new Date();
const post_ids = await post_idFetcher();
const firstTwoPost_ids = post_ids.slice(2, 3);
const ReadTangleUrl = await Promise.all(firstTwoPost_ids.map(constructReadTangleUrl));
const Comments = await fetchComments(ReadTangleUrl);
return Comments;
} catch (error) {
console.log("Caught an error:", error);
}
}
const urls = await Sendingemail();
console.log(urls);