mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 22:36:03 +01:00
Update discord.lua
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user