mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
fix: bot token check
This commit is contained in:
@@ -57,6 +57,7 @@ function NDCore.loadSQL(fileLocation, resource)
|
||||
end
|
||||
|
||||
function NDCore.getDiscordInfo(discordUserId)
|
||||
if not discordUserId or not Config.discordBotToken or not Config.discordGuildId then return end
|
||||
local done = false
|
||||
local data
|
||||
local discordErrors = {
|
||||
@@ -66,7 +67,6 @@ function NDCore.getDiscordInfo(discordUserId)
|
||||
[429] = "Discord bot rate limited"
|
||||
}
|
||||
|
||||
if not discordUserId then return end
|
||||
if type(discordUserId) == "string" and discordUserId:find("discord:") then discordUserId:gsub("discord:", "") end
|
||||
|
||||
PerformHttpRequest(("https://discordapp.com/api/guilds/%s/members/%s"):format(Config.discordGuildId, discordUserId), function(errorCode, resultData, resultHeaders)
|
||||
|
||||
Reference in New Issue
Block a user