As the title says, I'm unable to find the function in PRAW to reply to a post on Reddit.
I've written a rather simple bot so far, which looks for new posts on a certain subreddit. My problem is that once finding the submission, I can't find how to post a reply to it.
It's unclear if by "submission" you mean a submission to reddit or if you're referencing a comment on a submission to reddit. If it's the former, you're looking for the Submission#add_comment method. If you have the submission bound to variable name s
, then you can do the following:
s.add_comment('This is my comment. There are many like it, but this one is mine.')
If you're looking for how to reply to a comment, you want to use the Comment#reply method. If you have the comment bound to variable name c
, then you can do the following:
c.reply("Here is a reply to your comment.")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With