From fac7c91bcbde8fa3481511d1045f4dcd821e4b73 Mon Sep 17 00:00:00 2001 From: Alex / Awex Date: Mon, 23 Aug 2021 07:02:25 -0400 Subject: [PATCH] Added SplitStat Status Checking --- assets/js/splitstat.js | 18 +++++ splitstat.html | 139 +-------------------------------------- splitstatbot/home.html | 139 +++++++++++++++++++++++++++++++++++++++ splitstatbot/status.html | 131 ++++++++++++++++++++++++++++++++++++ 4 files changed, 291 insertions(+), 136 deletions(-) create mode 100644 assets/js/splitstat.js create mode 100644 splitstatbot/home.html create mode 100644 splitstatbot/status.html diff --git a/assets/js/splitstat.js b/assets/js/splitstat.js new file mode 100644 index 0000000..f09303f --- /dev/null +++ b/assets/js/splitstat.js @@ -0,0 +1,18 @@ +async function checkForOutage() { + Global = {} + Global.error = false + await fetch(`https://api-splitstat.awexxx.xyz/heartbeat`).then(response => response.json()).catch(err => { + Global.error = true; + document.getElementById(`status`).innerText = `offline!` + document.getElementById(`addon`).innerText = `API returned nothing when sent a heartbeat.` + }) + + if (Global.error === false) { + document.getElementById(`status`).innerText = `online!` + document.getElementById(`addon`).innerText = `API responded when sent a heartbeat!` + } + + console.log(`Checked, checking in 10s`) + + setTimeout(checkForOutage, 10000); +} \ No newline at end of file diff --git a/splitstat.html b/splitstat.html index bd9a7b1..357abb8 100644 --- a/splitstat.html +++ b/splitstat.html @@ -1,139 +1,6 @@ - - - Awex >> Splitstat - - - - - - - - - - - - - - - - - - - - - - - - - - + + Redirecting.. - - - - -

See your Splitgate stats -- all from the comfort of Discord

-

Get some stats with one command! Splitstat is the free, open-source Discord bot to check up on how you're doing in-game!
- Note: This can only look up Steam users at the moment until XBL & PSN support is implemented on Tracker.gg's side.

-

To learn how to find your profile, see spl!idhelp!

-

Commands

-

Prefix is spl!
- ping
- stat
- cat
-idhelp
-help

- -

- -

Want to invite it?

-

Click on this to add it to your server!

- - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/splitstatbot/home.html b/splitstatbot/home.html new file mode 100644 index 0000000..bd9a7b1 --- /dev/null +++ b/splitstatbot/home.html @@ -0,0 +1,139 @@ + + + + + Awex >> Splitstat + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

See your Splitgate stats -- all from the comfort of Discord

+

Get some stats with one command! Splitstat is the free, open-source Discord bot to check up on how you're doing in-game!
+ Note: This can only look up Steam users at the moment until XBL & PSN support is implemented on Tracker.gg's side.

+

To learn how to find your profile, see spl!idhelp!

+

Commands

+

Prefix is spl!
+ ping
+ stat
+ cat
+idhelp
+help

+ +

+ +

Want to invite it?

+

Click on this to add it to your server!

+ + + + + + + \ No newline at end of file diff --git a/splitstatbot/status.html b/splitstatbot/status.html new file mode 100644 index 0000000..c8f4939 --- /dev/null +++ b/splitstatbot/status.html @@ -0,0 +1,131 @@ + + + + + Awex >> Splitstat + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Currently, SplitStat is !

+

+ + + + + + + \ No newline at end of file