Module sv_discord
Discord Module
Functions
| GetHighestUserRole (discord) | GetHighestUserRole function. |
| IsRolePresent (discord, role) | IsRolePresent function. |
| GetDiscordName (id) | GetDiscordName function. |
Functions
- GetHighestUserRole (discord)
-
GetHighestUserRole function.
This function gets the highest role of a user.
Parameters:
- discord The user to get the highest role of. number
Returns:
-
string
Usage:
local highestRole = exports.jones_util:GetHighestUserRole(discord)
- IsRolePresent (discord, role)
-
IsRolePresent function.
This function checks if a user has a role.
Parameters:
- discord The user to check. number
- role The role to check. string
Returns:
-
boolean
Usage:
local hasRole = exports.jones_util:IsRolePresent(discord, "admin")
- GetDiscordName (id)
-
GetDiscordName function.
This function gets the discord name of a user.
Parameters:
- id The user to get the discord name of. number
Returns:
-
string
Usage:
local discordName = exports.jones_util:GetDiscordName(discord)