Update discord.lua

This commit is contained in:
Andyyy7666
2022-02-26 01:43:53 +01:00
committed by GitHub
parent dddd101239
commit 554cbc15c1

View File

@@ -14,7 +14,7 @@ function DiscordRequest(method, endpoint, jsondata)
return data return data
end end
function IsRolePresent(user, role) function IsRolePresent(user, role, theTable)
local discordId = nil local discordId = nil
for _, id in ipairs(GetPlayerIdentifiers(user)) do for _, id in ipairs(GetPlayerIdentifiers(user)) do
if string.match(id, "discord:") then if string.match(id, "discord:") then
@@ -28,7 +28,7 @@ function IsRolePresent(user, role)
if type(role) == "number" then if type(role) == "number" then
theRole = tostring(role) theRole = tostring(role)
else else
theRole = server_config.roles[role] theRole = theTable[role]
end end
if theRole == "0" then if theRole == "0" then