giorgi-o / SkinPeek

Awesome Valorant Discord bot to see your daily shop, night market, battlepass progression, and much more
GNU General Public License v3.0
218 stars 89 forks source link

add better error explanations #104

Open iwa opened 5 months ago

iwa commented 5 months ago

lots of time when the bot returns an error, it can often be fixed by a relogin couldn't you add some better errors messages so user aren't confused by whats happening? more verbose error can't be something bad

giorgi-o commented 5 months ago

I agree, however the issue is that the error changes depending on what is causing the current session to not work, whether it's the Cloudflare firewall, the authentication, the shop server, etc.

Could you send me a screenshot of a console error that can be fixed by relogging? If so I can change that error to tell the user they have to /login again.

iwa commented 5 months ago

i think this would be the issue?

image

problem is i currently selfhost the bot on my homelab, so i don't get why we would get cf error?

edit: i don't normally get cloudflare captcha on my devices when home

giorgi-o commented 4 months ago

The way the Cloudflare firewall works isn't on/off, but it calculates a "score" based on many factors, to determine whether the username/password login is coming from an official riot client or not.

The IP address plays a part (whether it's an enterprise or home address, how many different accounts share that IP, etc) but also tons of other metrics like user-agent, TLS fingerprinting, even stuff like the timing of the response. There are world experts at Cloudflare whose entire job it is to maintain this algorithm btw.

SkinPeek tries its best to pretend to be the Rito launcher, but it's not 100%. And if Cloudflare detects you, there's not much I or anyone can do unfortunately, sorry.