Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
[PRAW] Trigger bot to reply to parent (top level) post?
Author Summary
CWinthrop is in PRAW
Post Body

So I've got a bot script that runs beautifully as is, when triggered it replies with a specific statement based on the trigger.

What I'd like it to do is instead of replying to the comment that triggers it, reply to the top level post (parent?) and remove the comment that triggered it.

For example, right now the bot does this:

{some troll} starts a thread breaking a rule of the subreddit.

    {me} !trigger brokenrule

        {bot} The rule for (brokenrule) states blah de blah. As such, this thread is now locked.

And then the bot locks the thread (and optionally removes it)

What I'd like to end up with is:

{some troll} starts a thread breaking a rule of the subreddit.

    {bot} The rule for (brokenrule) states blah de blah. As such, this thread is now locked.

With my triggering comment removed, of course.

Can that be done? Thanks!

(Special thanks to /u/ummmbacon from /r/redditdev)

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
19,425
Link Karma
6,051
Comment Karma
13,278
Profile updated: 5 days ago
Posts updated: 9 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago