rhgrant10 / berserk

Python client for the lichess API
https://berserk.readthedocs.io
Other
142 stars 36 forks source link

Challenges not customizable #5

Closed tschmoderer closed 4 years ago

tschmoderer commented 4 years ago

Description

trying to create a customized challenge.

What I Did

client.challenges.create(username="tschmoderer", rated=False, clock_limit=300, clock_increment=1)

no crash but the options were not taken into account. i got a correspondence unlimited challenge.

WolfgangFahl commented 4 years ago

What did you do about it?

rhgrant10 commented 4 years ago

Thanks for reporting this. Just checked the relevant code and I see it's literally not passing along any of the options when it makes the post request. I'll release a fix soon (but probably after Christmas :sweat_smile:).

PiR43 commented 4 years ago

I am also impacted by this bug. I use the color parameter when creating chalenge but for the moment the color is always random :-)

rhgrant10 commented 4 years ago

Thanks @PiR43 and @WolfgangFahl for being patient with me over the holidays! This should be fixed in v0.3.2 on the PyPI!

Please test this out and verify that it works as intended. I don't have a bot account I can test this with.

rhgrant10 commented 4 years ago

Also thank you @tschmoderer for originally reporting this.

PiR43 commented 4 years ago

@rhgrant10 Thanks, I have just updated the lib but need few days for test it (I use just the color param and need play few games for be sure the color is always good).

PiR43 commented 4 years ago

I have done several tests and all are ok for the color parameter. Thanks.