[mega-thread] Automator - A forum bot that responds to domain removal requests (and soon more)

So does Puppeteer act like a real user? Do you press the login button and the make post button, or do you just POST a URL?

Oof. (i do not like to 20 character limit)

Spelling error in the message ^^^

Oh shoot! Tysm  (Speed typos :stuck_out_tongue: )

2 Likes

I think it’s one of those spelling errors where nobody notices unless you read carefully :mag_right:

1 Like

how will the bot know if someone needs a domain removal?

@ihack2712

It checks the topic title and first post in the topic. If it contains domain it sends the automated message.

1 Like

image

1 Like

domain test


Expect a message to arrive by me in this topic in 5 minutes.

Also, anyone feel free to create a test topic about domain removals just to see if it actually works on other topics as well

Does it do posts or just topics, as the majority of the time it’s just us talking about domain removals, not people asking :joy:

It only fetches the first post in every topic:

const t = topics[i];
const postID = (await api.getTopic(t.id)).post_stream.stream[0];
const post = await api.getPost(postID);
t.content = post.raw;
t.username = post.username;

Here’s the JSON output of what the final topic object looks like:

	{
		"id": 29098,
		"title": "Test domain removal post",
		"slug": "test-domain-removal-post",
		"created_at": "2020-07-24T15:05:28.137Z",
		"content": "Please ignore this post, this is my final testing post for checking whether or not Automator is going to work, sorry again.",
		"username": "ihack2712"
	},

Just a quick disclaimer!!

I DO NOT STORE ANY INFORMATION EXCEPT FOR A TOPIC ID TO PREVENT THE BOT FROM RE-POSTING OR TO MAKE A REQUEST AGAINST THE SAME TOPIC TWICE.

1 Like

It works!!!

I’ve spent literally 1.5 days on this, and it feels amazing to finally have it working!

1 Like

Can I test it out? (stupid 20 char limit)

Wdym? Like you can probably create a topic or something

What next should I automate on the Glitch Support forum? :joy:

Takes about a minute to post :slight_smile: Let’s hope it beats any Regulars! :joy: Works great!
Does it look for ‘domain’ or ‘domain removals’? As some posts are asking how to add them. Maybe add some more context to the post, like:

If you want to add a domain, bla, bla, bla.
If you want to remove a domain, bla, bla, bla.
If this automated message does not relate to your topic, please kindly ignore the post

@disc-boop398 I just tested it, no need

The reason it takes time is because I only fetch updates from discourse every 5 minutes, I could fetch them per minute as well. That will still not be as bad as a normal discourse client.

I just made a topic, too late. Try getting to me before I do it next time -_-

:man_facepalming: