A premium, server-sided FiveM script for seamless Discord API integration.
Fetch user roles, username, avatar, guild name, and guild icon with robust caching, a configurable `/refreshroles` command, and support for ox_lib or native chat notifications. Expose powerful exports for other resources to leverage Discord data.
- ๐ Server-Sided Security: Fully server-sided to protect your Discord bot token from modders.
- ๐ User Data Retrieval: Fetches Discord username, avatar, and roles for connected players.
- ๐ฐ Guild Information: Retrieves guild name and icon, enhancing server integration.
- โณ Caching System: Caches data for 600 seconds to minimize API calls and avoid rate limits.
- ๐ Refresh Command:
/refreshroleswith configurable cooldown (default 300 seconds) to force-refresh player data. - ๐ Notification Options: Exclusive support for
ox_libnotifications or native FiveM chat, configurable viaconfig.lua. - ๐ Exports: Robust exports for accessing Discord data in other resources:
getRoles,hasRole,getUsername,getAvatar,getGuildName,getGuildIcon,getUser.
- ๐ Professional Logging: Minimal, color-coded console logs for script initialization (
^2[SUCCESS],^1[ERROR]).
- ๐ค Discord Bot: Requires
Server Members Intentand permissions forView ChannelsandRead Member Information. - ๐ ox_lib (optional): Needed only for
ox_libnotifications (Overextended/ox_lib).
- ๐ Support Server: For support with this script please message me on discord my info is ahead. Username "vxzckv"(1267881174928330764)
- ๐ Thank you!: Thank you for using this script, more comming soon!