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

TestBot.html throwing an error #27

Open
ajm2017 opened this issue Nov 3, 2021 · 5 comments
Open

TestBot.html throwing an error #27

ajm2017 opened this issue Nov 3, 2021 · 5 comments

Comments

@ajm2017
Copy link

ajm2017 commented Nov 3, 2021

https://tailuge.github.io/bot-o-tron/dist/testBot.html

Hello - I was testing my new token and I am getting an error in Chrome.
Console says:

Uncaught (in promise) TypeError: this.api.accountInfo is not a function
at t.exports.start (library.js:2)
at start (testBot.html:69)
at HTMLButtonElement.onclick (testBot.html:76)

I wrote my own engine in JS and am trying to figure out how to make a bot account at lichess; I was very interested in seeing your API implementation!

Ty!!

@tailuge
Copy link
Owner

tailuge commented Nov 3, 2021 via email

@ajm2017
Copy link
Author

ajm2017 commented Nov 4, 2021

Ok, I see. I've got everything installed in node - I'm using my token and the chess.js engine in your package (I haven't subbed my engine in yet) and the server is listening on 5000. But, the bot account doesn't seem to be accepting any challenges and I don't see anything coming through on the server. I have my firewall off and port forwarding on my router to 5000 on my machine.

Sry to bug you :) -- thx so much for any help!!

@ajm2017
Copy link
Author

ajm2017 commented Nov 4, 2021

I determined that "setx API_TOKEN xxxxxxxxxx" was not accessible by "process.env.API_TOKEN" so I just hard coded my token and - IT's WORKING! :)

@ajm2017
Copy link
Author

ajm2017 commented Nov 4, 2021

I found this!
https://stackoverflow.com/questions/35347451/why-is-setx-path-not-working

the setx var is not accessible in the current command window. But in subsequent windows it's available.

@tailuge
Copy link
Owner

tailuge commented Nov 4, 2021 via email

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

No branches or pull requests

2 participants