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

add clarifying comments for dates/times #78

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

Conversation

adepssimius
Copy link

This should be set to the day after the
last available day with restaurant reservations as this is the day you want to snipe for a reservation once they
become available.

I removed this as it isn't necessarily true. If I want to snipe for something a while in the future, it's not necessarily the day after the last available day with reservations.

@adepssimius
Copy link
Author

Oh, after reading through the actual code, I see that you only attempt to schedule once then the program stops, so you actually have to start the bot within 24 hours of a reservation coming available. Some of my changes may not be appropriate then.

@Alkaar
Copy link
Owner

Alkaar commented Jan 13, 2023

That is a valid point actually. I make the assumption that you should start the bot 24 hours before the reservation becomes available but it's not very explicit in the documentation. I'm usually trying to snipe reservations on a daily basis so I'm always trying to grab the next available reservation. But it is possible I want a reservation for a specific day and only that day, far out in the future. I've never tried this but I am curious how it would behave and that would determine how this documentation should be updated.

@adepssimius
Copy link
Author

It doesn't appear that in the current iteration it would handle a snipe time beyond one day out. From the code below:
image

nextSnipeTime is only ever set to today or tomorrow, then it is scheduled to run once then quit. There is currently no handling for calling the scheduler again if the reservation is not yet available or the ability to set the snipe time for more than one day in the future. That starts to involve time zone fun, my aversion to which is why I made the edits to the readme in this PR in the first place lol.

I could give a PR a try but you would have to give my code a good looking over. I daily JS/TS and PHP.

@Alkaar
Copy link
Owner

Alkaar commented Jan 28, 2023

I guess what behavior would you like it to do? I don't want this bot to accidentally hammer the endpoint which is why I didn't design it to constantly poke even though a few people have requested that use case.

I can see the benefit of scheduling beyond 24 hours but then it's on you the sniper to do the date math of the day you want it to snipe. The simplest way I can see of doing this is allowing you to not only specify a time but a date as well. The date can be optional so if no date is provided, it will assume the next possible time.

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.

2 participants