We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4e5d43 + 158d3fa commit 05af6f5Copy full SHA for 05af6f5
lib/https.lua
@@ -1,9 +1,14 @@
1
-- Update the Cryptid member count using HTTPS
2
local member_fallback = 24000
3
-local https = require("SMODS.https")
+local succ, https = pcall(require, "SMODS.https")
4
local last_update_time = 0
5
local initial = true
6
Cryptid.member_count = member_fallback
7
+if not succ then
8
+ sendErrorMessage("HTTP module could not be loaded. " .. tostring(https), "Cryptid")
9
+ return
10
+end
11
+
12
local function apply_discord_member_count(code, body, headers)
13
if body then
14
Cryptid.member_count = string.match(body, '"approximate_member_count"%s*:%s*(%d+)')
0 commit comments