Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality for replying to submissions #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stefanosporiazis
Copy link
Contributor

Changes:

  • Added a submission stream and another call to run_stream
  • New method handle_submission
    Works the same way as handle_comment
  • New method valid_submission
    Again works the same way as valid_comment, only it doesn't check if the submission was posted by the bot since the bot only comments
  • Modified handle_username_mention to make it work for submissions
    Reddit for some reason doesn't notify for username mentions in submissions, so I don't think the bot can find submissions outside of the subreddits it's monitoring
  • New method get_responses_for_comic_ids
    Basically took the block of code that iterated over the comic_ids to get the responses and made it into a method
  • New method get_responses_for_comic_titles
    Same as above

I intended to add tests for the new methods but it's kind of complicated because I have to make a mock submission and a mock response or something, so I'm still trying to work those out.

@joeyvanlierop
Copy link
Owner

This looks really great! I'll see if I can put something together for the tests, however I have been quite busy recently so unfortunately I cannot give an estimate. Thanks for the fantastic contribution!

@stefanosporiazis stefanosporiazis marked this pull request as ready for review July 15, 2020 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants