Alkaar / resy-booking-bot

🔫 Helps to snipe hard to get reservations at restaurants that use resy
409 stars 215 forks source link

Can't seem to book openly available reservations #50

Closed jeb2260 closed 1 year ago

jeb2260 commented 2 years ago

Hi,

I've been trying the bot out to just test it. I'm trying to book a spot here for the 28th.

https://resy.com/cities/ny/the-bar-room-at-the-beekman?date=2022-10-28&seats=2

It should be able to reserve it since it's not in demand, but it keeps missing the shot for me. My Config file is below, and I've removed the apiKey and authToken. Any help would be appreciated!

package com.resy

object ResyConfig {

  val resyKeys: ResyKeys = ResyKeys(
    // Your user profile API key which can be found via your browser web console in your headers
    // called "authorization"
    apiKey = "",
    // Your user profile authentication token which can be found via your browser web console in
    // your headers called "x-resy-auth-token"
    authToken = ""
  )
  val resDetails: ReservationDetails = ReservationDetails(
    // Date of the reservation in YYYY-MM-DD format
    date = "2022-10-28",
    // Size of the party reservation
    partySize = 2,
    // Unique identifier of the restaurant where you want to make the reservation
    venueId = 40703,
    // Priority list of reservation times and table types. Time is in military time HH:MM:SS format.
    // If no preference on table type, then simply don't set it.   
    resTimeTypes = Seq(
      ReservationTimeType("18:00:00"),
    )
  )

  val snipeTime: SnipeTime = SnipeTime(
    // Hour of the day when reservations become available and when you want to snipe
    hours = 19,
    // Minute of the day when reservations become available and when you want to snipe
    minutes = 23
  )
}

The output I'm getting is

[INFO ] 2022-10-03 20:09:05.656-04:00 ResyBookingWorkflow:18 - Taking the shot...
[INFO ] 2022-10-03 20:09:05.657-04:00 ResyBookingWorkflow:19 - (҂‾ ▵‾)︻デ═一 (˚▽˚’!)/
[INFO ] 2022-10-03 20:09:05.657-04:00 ResyBookingWorkflow:20 - Attempting to snipe reservation
[INFO ] 2022-10-03 20:09:05.785-04:00 ResyClient:197 - Config Id: rgs://resy/40703/1484236/2/2022-10-28/2022-10-28/18:00:00/2/The Bar Room
[INFO ] 2022-10-03 20:09:05.826-04:00 ResyClient:97 - Missed the shot!
[INFO ] 2022-10-03 20:09:05.827-04:00 ResyClient:98 - ┻━┻ ︵ \(°□°)/ ︵ ┻━┻
[INFO ] 2022-10-03 20:09:05.828-04:00 ResyClient:99 - Unknown error occurred

My only guess is that it has to do with resTimeTypes but I'm not sure what it could be (I'm not trying to set a specific table type for testing purposes)

Alkaar commented 2 years ago

So there are two possibilities that I can determine from what you shared.

Firstly, I saw you edited your code from

ReservationTimeType("18:00:00","")

to

ReservationTimeType("18:00:00")

This matters because in the first case, it looks for a tableType of empty string while in the second case, it doesn't look for tableType at all.

Secondly, I think you do not have a payment method set on your account. The bot assumes one is provided and it's failing because you don't have one set. So simply adding one should fix this issue.

Hopefully that helps but there are two things I can do to improve things a bit.

  1. I can make an empty string tableType the same as not passing tableType at all. This will help prevent user error.
  2. I can update the instructions that a payment method must be set on the account.
jeb2260 commented 2 years ago

Your first point about ReservationTimeType makes total sense, I noticed it myself as I was trying to think of what could go wrong lol

And you're right about the payment method! I didn't have one set up, and once I set it up, the bot worked as planned. Thanks for your help!

Alkaar commented 2 years ago

Reopening this so I don't forget the two suggested improvements I mentioned

Alkaar commented 2 years ago
  1. I can update the instructions that a payment method must be set on the account.

Addressed here https://github.com/Alkaar/resy-booking-bot/pull/59

Alkaar commented 1 year ago
  1. I can make an empty string tableType the same as not passing tableType at all. This will help prevent user error.

Addressed here https://github.com/Alkaar/resy-booking-bot/pull/86

Since I addressed all open fixes, I'm going to close out this issue.