Readme

Actually, It's 𝕏

An annoying bot that corrects people about the new name of the app previously known as Twitter. Follow it on 𝕏!

Screenshot 2023-08-17 at 4.48.03 PM.png

The Twitter β†’ 𝕏 transition is pretty painful, and this bot is here to make things even worse!

Want to create your own bot? Check out https://www.val.town/v/andreterron.twitter

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
import { correctPostAboutTwitter } from "https://esm.town/v/andreterron/correctPostAboutTwitter";
import { sortedPosts } from "https://esm.town/v/andreterron/sortedPosts";
import { searchPostsForTheActuallyBot } from "https://esm.town/v/andreterron/searchPostsForTheActuallyBot";
import { refreshActuallyBotToken } from "https://esm.town/v/andreterron/refreshActuallyBotToken";
export async function actuallyItsXBot() {
const token = await refreshActuallyBotToken();
//
// Search
const posts = await searchPostsForTheActuallyBot(
token.access_token,
);
const detailed = await sortedPosts({
posts,
accessToken: token.access_token,
});
//
const post = detailed[0];
if (!post) {
if (posts.length) {
throw new Error("Failed to get post users");
}
console.log("No valid posts returned");
return;
}
const reply = await correctPostAboutTwitter({
id: post.id,
accessToken: token.access_token,
});
//
return reply;
}
πŸ‘† This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data β€” all from the browser.