bot-o-tron icon indicating copy to clipboard operation
bot-o-tron copied to clipboard

TestBot.html throwing an error

Open ajm2017 opened this issue 3 years ago • 5 comments

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!!

ajm2017 avatar Nov 03 '21 03:11 ajm2017

Hi its designed to work in node not chrome.

good luck

On Wednesday, 3 November 2021, 03:26:36 GMT, ajm2017 @.***> wrote:

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!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

tailuge avatar Nov 03 '21 09:11 tailuge

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 avatar Nov 04 '21 00:11 ajm2017

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 avatar Nov 04 '21 02:11 ajm2017

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.

ajm2017 avatar Nov 04 '21 02:11 ajm2017

Nicely worked out. I'm not used to windows

Thanks.

On Thursday, 4 November 2021, 02:41:28 GMT, ajm2017 @.***> wrote:

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.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android .  

tailuge avatar Nov 04 '21 11:11 tailuge