1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
// import { twitterSearch } from "https://esm.town/v/stevekrouse/twitterSearch";
// const excludedUsernames = [
// // "valenzuelacity",
// ];
// const baseQuery = "\"val.town\" OR \"val town\" -_ValTown_ -is:retweet";
// const excludeUsersQuery = excludedUsernames.map(username => `-from:${username}`).join(" ");
// const query = `${baseQuery}`.trim();
// console.log(Deno.env.get("twitter"));
// export async function twitterAlert() {
// const results = await twitterSearch({
// query,
// // start_time: lastRunAt,
// start_time: new Date(Date.now() - 24 * 60 * 60 * 1000), // 1 day
// bearerToken: Deno.env.get("twitter"),
// });
// if (!results.length) return;
// // format results
// let content = results
// .map(({ author_name, author_username, text, id }) => `https://fxtwitter.com/${author_username}/status/${id}`)
// .join("\n");
// return content;
// // notify
// // await discordWebhook({
// // url: Deno.env.get("mentionsDiscord"),
// // content,
// // });
// }
export async function main() {
console.log("ok");
}