Skip to content

Commit

Permalink
stop checking version when rate limited
Browse files Browse the repository at this point in the history
  • Loading branch information
KebsCS committed Nov 25, 2023
1 parent 3622ee2 commit 792ea6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions KBotExt/Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class Misc
{
const std::string getLatest = cpr::Get(cpr::Url{ "https://api.github.com/repos/KebsCS/KBotExt/releases/latest" }).text;

if (getLatest.contains("API rate limit"))
return;

const Json::CharReaderBuilder builder;
const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
JSONCPP_STRING err;
Expand Down Expand Up @@ -118,6 +121,9 @@ class Misc
{
const std::string getPrerelease = cpr::Get(cpr::Url{ "https://api.github.com/repos/KebsCS/KBotExt/releases/tags/prerelease" }).text;

if (getPrerelease.contains("API rate limit"))
return;

const Json::CharReaderBuilder builder;
const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
JSONCPP_STRING err;
Expand Down

0 comments on commit 792ea6b

Please sign in to comment.