[RELEASE] [FREE] lizaarragaa Discord Roles

Lizaarraagaa Discord Roles System

Hi to all the people, i’m presenting this new script i’ve made for all the fivem community.

This script allows you to do the next things.

-- Check If User Is In The Guild
exports["lzrgaDiscord"]:checkIsInGuild(userId --[[ integer ]])

-- Remove Role to User
 exports["lzrgaDiscord"]:removeRole(userId --[[ integer ]], roleId --[[ integer ]])

-- Give Role to User
exports["lzrgaDiscord"]:giveRole(userId --[[ integer ]], roleId --[[ integer ]])

-- Check Bot Token (It's just to check if the specified discord token is valid)
exports["lzrgaDiscord"]:checkBotToken()

-- Check if user has an specific role
exports["lzrgaDiscord"]:checkUserHasRole(userId --[[ integer ]], roleId --[[ integer ]])

-- Get All Roles from a User
exports["lzrgaDiscord"]:getUserRoles(userId --[[ integer ]]) --[[ Returns an array/table ]]

-- Get Avatar from User
local avatarData = exports["lzrgaDiscord"]:getUserAvatar(userId --[[ integer ]])
local avatarId = avatarData.id
local avatarURL = avatarData.avatarURL

-- Get Data From User Account
exports["lzrgaDiscord"]:getUserData(userId --[[ integer ]]) --[[ returns: Data Array/Table ]]

-- Get Current User Status
exports["lzrgaDiscord"]:getUserStatus(userId --[[ integer ]]) --[[ returns: online/dnd/etc. ]]

-- Get User Biography
exports["lzrgaDiscord"]:getUserBio(userId --[[ integer ]]) ---[[ returns the user biography. ]]

You can do everything you want except selling this script that is free.
Soon i will update and add more data and functions to get better script that the thing that is right now.

Download Link: https://github.com/ZeskGarcia/lzrgaDiscord

Thanks and have a nice day :slight_smile:.

Script Data

Code is accessible Yes/No
Subscription-based Yes/No
Lines (approximately) +225
Requirements None
Support Yes/No
7 Likes

PS: i would suggest adding the server_only 'yes' manifest to your fxmanifest.lua

Simply prevents the client from downloading this resource and it’s marked as server only.

I haven’t tried it so i can’t say how it will behave different when the export is called by the client, but please go ahead and try it.

Read more on the Cfx docs: Resource manifest - Cfx.re Docs

1 Like

Hey!
I’ve just added the server_only 'yes' in the fxmanifest.lua.
The main idea i’ve it only was to run the exports in the server side and not in the client side. But i’m trying to do that for soon in client side if needed.

Yeah, i personally haven’t used that manifest yet, but please go ahead and test it before pushing it to the github, i can’t say how it will behave differently, but it just prevents the client from even downloading/loading the resource in the first place.

Good evening everyone, I wanted to install the bot on our server but it doesn’t start. BotToken and GuildID were stored correctly.
Does anyone know what could be causing it and how to fix it?

Hi, i’m checking in some minutes you’re error. But bot shouldn’t be online, just requests into discord API. Be sure enabling the 3 intents.

Which three views do you mean? I’m not very familiar with Discord.

Message Intent, Presence Intent, and Guild Intents.
I’m not sure if those are, but that would be located in discord bot’s page.

image

How can I resolve the error?