Closed stewx closed 2 years ago
Any updates here? I've got vs code and scala (metals) dl but cant build it.
Sorry for not keeping up to date on these issues as I've not used nor maintained the bot due to the pandemic. As of now, it seems that Resy updated the API endpoint so the contract is completely different. I have tried to go through the bot to fix things but I haven't gotten around to fixing it completely. Just wanted to make you all aware.
Ahh thank you for posting! Eagerly awaiting an update to get this running :) Hope you're safe and healthy.
Hey, so I did finally get around to fixing the bot along with a few minor fixes. Give it a shot and LMK your thoughts.
In terms of running it, I just hit run in IntelliJ. I believe it should figure it out since there is only one main class. If that's not working for you, LMK and I can update the documentation with that info.
Great to hear! I just redownloaded and built it in IntelliJ & VSC, but cant get it to run. Any chance you could provide a screenshot?
On Tue, Aug 2, 2022 at 5:29 PM Alkaar @.***> wrote:
Hey, so I did finally get around to fixing the bot along with a few minor fixes. Give it a shot and LMK your thoughts.
In terms of running it, I just hit run in IntelliJ. I believe it should figure it out since there is only one main class. If that's not working for you, LMK and I can update the documentation with that info.
— Reply to this email directly, view it on GitHub https://github.com/Alkaar/resy-booking-bot/issues/11#issuecomment-1203232607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYEFQZUGWUNBNNGKRGD5A5DVXGHMDANCNFSM5AUCF4OQ . You are receiving this because you commented.Message ID: @.***>
@mohnik1 could you provide a bit more context about the error you are seeing when you say you cant get it to run
so I have a better idea of how to help you.
Also I did a fairly large internal refactor and just pushed a bugfix I accidentally introduce so please try pulling it again.
@Alkaar I have never used IntelliJ so sorry for my lack of knowledge...but I build it then go to run and receive:
Error: Could not find or load main class com.resy.ResyBookingBot Caused by: java.lang.ClassNotFoundException: com.resy.ResyBookingBot
@mohnik1 you have to specify the main entry point of the class to run which lives in com.resy.ResyBookingBot
. IntelliJ tries to find it for you automatically but sometimes it can't.
Also since this is a Scala app, you can run it via sbt by simply typing sbt
and then typing run
.
@Alkaar Never really used Scala. If I run sbt run
the code runs with success but ends.
How does it work after this? Where does the bot actually is? Is it stored somewhere internally and runs a background job using internal system?
Thank you very much for building this!
So when you run sbt
, it spins up a JVM instance, and executing run
after that will run the bot inside of that JVM instance. When you run sbt run
within the same command, it runs whatever command you pass to sbt in that one instance of the JVM and then immediately kills it. So in your case, you are killing the bot before it's even had a chance to complete. It would be synonymous with running IntelliJ, running the bot, then killing IntelliJ.
So run sbt
as one command, then run
as the second command.
I've had a lot of people use my bot who are not that familiar with Scala and sbt so I can put some run instructions in the readme for guidance.
@Alkaar Thank you! It worked 🙌
Added instructions for running the bot in this PR 👉 https://github.com/Alkaar/resy-booking-bot/pull/36
Will close this issue if no other concerns
@mohnik1 you have to specify the main entry point of the class to run which lives in
com.resy.ResyBookingBot
. IntelliJ tries to find it for you automatically but sometimes it can't.Also since this is a Scala app, you can run it via sbt by simply typing
sbt
and then typingrun
.
@Alkaar I'm not sure why its still throwing an error, the directory & class look to be defined correctly. Apologies for being a complete nub at this, but am I looking in the wrong place? Below is what I'm seeing.
I don't think you've set up IntelliJ correctly. If you notice, my folder hierarchy looks slightly different. Notably the scala folder is blue. This tells IntelliJ that the source code lives there. Yours is not set up that way so likely that is at least one of the reasons IntelliJ can't find the main class.
Folder Hierarchy
Below can be found under File ➡️ Project Structure ➡️ Project Settings ➡️ Modules ➡️ Sources
@Alkaar Thank you, made some progress here...looks like the folder hierarchy was the main issue. Loaded a new project & defined the sources, looks to be configured correctly. Only receiving a build error on timing formats now.
I haven't heard back here but if no issues, I'm going to be closing this. I also added more instructions in the readme. Feel free to reopen if there are any more questions regarding this.
FYI since a lot of people had some confusion around how to set the reservation time and table type, I made a change to hopefully make this a little bit more clear 👉 https://github.com/Alkaar/resy-booking-bot/pull/54
i made the scala folder my source and it resolved the issue of com.resy not being found, but now the "ResyBookingBot' portion of "com.resy.ResyBookingBot" is showing an error and I'm not sure how to fix it.
I wrote up a Wiki on getting started since a lot of people were asking questions on this. Specifically, see if the troubleshooting section helps
Do I just need to run "sbt" to run the server? Are there any other commands required?