Unable to load image

Auto-reply bot - for when a dramacel literally can't shut the frick up

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

27
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 :marseywinner: solution that came to mind :marppyenraged:

Jump in the discussion.

No email address required.

I only responded to my notifications smh

Jump in the discussion.

No email address required.

:marse#ykys:

Jump in the discussion.

No email address required.

The needful, Penny. I did the needful to him.

Jump in the discussion.

No email address required.

@Greu made OP sneed so hard, he had to script his way out of it! :marseylaugh:

Clever but still full of sneed. :marseybow:

!dramatards, behold a real one who made a dramaturd code for free.

:#marseycheers:

Jump in the discussion.

No email address required.

Also I recognized the general :marseydayan: case of "some cute twink :marseyhomosupremacist: with unblockable DMing inecessantly"

Jump in the discussion.

No email address required.

I considered hiding :marseyinabox: my shame, but I'm mission :marseybush: oriented :marseysoldieramerica:

Jump in the discussion.

No email address required.

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.

Uh-oh, recursion!

Jump in the discussion.

No email address required.

:#marseydiehard:

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.