const axios = require("axios");
const { setTimeout } = require("timers/promises");
const HOST = "https://rdrama.net";
const REPLY_URL = `${HOST}/reply`;
const UNREAD_URL = `${HOST}/unread`;
const REPLY_MESSAGE = ":marse#ykys:";
const ACCESS_TOKEN = "YOUR_TOKEN_HERE";
async function execute() {
while (true) {
const config = { headers: { Authorization: ACCESS_TOKEN } };
console.log("CHECKING UNREADS");
const response = await axios.get(UNREAD_URL, config);
for (const unread of response.data.data) {
console.log("FOUND UNREAD\n", unread.author_name);
if (unread.author_name === "SomeStupidAsshole") {
const form = new FormData();
form.append("parent_id", unread.id);
form.append("body", REPLY_MESSAGE);
await axios.post(REPLY_URL, form, config);
console.log("SENT REPLY");
}
}
await setTimeout(60000);
}
}
execute().then(() => process.exit(0));
If you don't know how to into Javascript, reply here. This site doesn't yet allow you to check DMs without marking them as read, so I won't see any DMs while this script is needful for me
Jump in the discussion.
No email address required.
@Greu lmfao what u do to this poor sweet boy
Jump in the discussion.
No email address required.
Sometimes you really want someone to shut the frick up, but they don't know how. Naturally, automation was the first solution that came to mind
Jump in the discussion.
No email address required.
I only responded to my notifications smh
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
The needful, Penny. I did the needful to him.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
@Greu made OP sneed so hard, he had to script his way out of it!
Clever but still full of sneed.
!dramatards, behold a real one who made a dramaturd code for free.
Jump in the discussion.
No email address required.
Also I recognized the general case of "some cute twink with unblockable DMing inecessantly"
Jump in the discussion.
No email address required.
More options
Context
I considered hiding my shame, but I'm mission oriented
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Why'd you do this in Node when you could just do it in the browser? Would make it way easier to distribute as well
Jump in the discussion.
No email address required.
More options
Context
Uh-oh, recursion!
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
More options
Context
Shut up, cute twink
Jump in the discussion.
No email address required.
More options
Context