GithubHelp home page GithubHelp logo

Comments (17)

Torom avatar Torom commented on June 3, 2024 1

But I'll make the URL configurable soon.

from botli.

Torom avatar Torom commented on June 3, 2024

No. Currently the URL of lichess is hardcoded. But I should change that sometime.

If the API of PlayStrategy is compatible to the one of lichess, BotLi would theoretically work there too. But I have not dealt with any other site than lichess.

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Okay, so if i'd change that myself with a fork of your repository, which files must I change?
And yes, PlayStrategy's API is compatible to Lichess' APi :)

from botli.

Torom avatar Torom commented on June 3, 2024

Only api.py I guess

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Okay thx a lot!

from botli.

Torom avatar Torom commented on June 3, 2024

Now that I think about it, BotLi will probably crash if you try to play variants that are not also supported on Lichess.

Also python-chess, the library BotLi uses for pretty much everything, only supports the Lichess variants if I see it correctly.

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Oh okay but as there are many games but also lichess variants on PlayStrategy, we could use it at least for it

from botli.

Torom avatar Torom commented on June 3, 2024

Since 2c7b968 you can set the URL in the config.yml. Please give feedback how good this works.

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Thx! Where should I write the URL on the config file?

from botli.

Torom avatar Torom commented on June 3, 2024

Simply somewhere top level:

url: "https://playstrategy.org"

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Okay thank you very much I'll test it today :)

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

I've got this error :

Traceback (most recent call last):
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\emman\Documents\ttBOT\Echecs\BOT\PSBOT\BOT\user_interface.py", line 316, in
ui.main()
File "C:\Users\emman\Documents\ttBOT\Echecs\BOT\PSBOT\BOT\user_interface.py", line 53, in main
self.handle_bot_status()
File "C:\Users\emman\Documents\ttBOT\Echecs\BOT\PSBOT\BOT\user_interface.py", line 102, in handle_bot_status
if 'bot:play' not in self.api.get_token_scopes(self.config['token']):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_init
.py", line 289, in wrapped_f
return self(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_init
.py", line 379, in call
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_init_.py", line 314, in iter
return fut.result()
^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 401, in __get_result
raise self.exception
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\site-packages\tenacity_init
.py", line 382, in call
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\emman\Documents\ttBOT\Echecs\BOT\PSBOT\BOT\api.py", line 168, in get_token_scopes
return response.json()[token]['scopes']
^^^^^^^^^^^^^^^
File "C:\Users\emman\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

from botli.

Torom avatar Torom commented on June 3, 2024

It looks like they are missing this endpoint: https://lichess.org/api#tag/OAuth/operation/tokenTest

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Oh yes PlayStrategy tokens are old lichess tokens : it doesn't comport the suffix "lip"....

from botli.

Torom avatar Torom commented on June 3, 2024

That alone would not be a problem. But the API is too old. It simply lacks endpoints that BotLi needs to work correctly.

from botli.

ttBOT-on-Lichess avatar ttBOT-on-Lichess commented on June 3, 2024

Oh okay...

from botli.

M-DinhHoangViet avatar M-DinhHoangViet commented on June 3, 2024

playstrategy not have API Bots online

from botli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.