-
Notifications
You must be signed in to change notification settings - Fork 20
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
Choose between FrugalFeeds and Couponese (issue #204) #205
Conversation
…rating list of coupons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, thank you for contributing! This is a great improvement and should help reduce the trial and error needed when getting pizza!
Overall the command adjustments appear to to be working great. I like how you have structured _get_coupons_from_page
and the idea of shuffling coupons each time. There are some small adjustments I think would be nice which I've attached with the code. Some of these comments are up to your discretion; they are all relatively minor and could be argued either way if they are needed.
Just committed addressing your changes - if there's any issues let me know.
I'm still not certain if giving users a random sample of discount codes is the best way to approach things, as people might get unlucky (e.g. bot giving them 5 different mudcake discounts, excellent!), but I guess it's on the user to make use of the keywords function, and if you're getting decent results then I guess it's fine. |
nevermind, I think most recent commit is the best way to do the formatting |
Some small changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes. It's annoying that FrugalFeeds has included different codes.
I'm unsure how much I like the structure of the large for loop (iterating over range(0, NUMBER_WEBSITES)
within the main command function. Looping over a list of urls in _get_coupons
or _get_coupons_from_page
might be a better alternative.
An update:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is getting close to ready. I like the duplicate checking! A few small changes would be nice to make the typing more readable and reduce repetition.
Changes done 👍 |
This gives the user the ability to choose between FrugalFeeds and Couponese through a source optional argument. I ended up making it so the bot's default behaviour is to give the user a randomly generated combined list of coupons. I changed the hyperlink for the embed to FrugalFeeds, as there's a more comprehensive collection of coupon codes there.