Free // Lead magnet // Discord and FiveM

AL DiscordAPI

A free, zero-dependency Discord integration library for FiveM and web servers. Role syncing, permission checks, webhook logging, player data and server utilities, in a Node core plus a FiveM Lua bridge. MIT licensed, yours to extend. It also ships the client that talks to our license API, so it is the easiest way to see how the paid catalog protects itself.

import { DiscordAPI } from "@appleluis/discord-api";
const api = new DiscordAPI({ botToken: process.env.DISCORD_BOT_TOKEN, guildId: process.env.DISCORD_GUILD_ID });
await api.roles.syncRoles(memberId, ["verified", "donor"]);
await api.webhooks.postEmbed(url, { title: "Player joined", description: name });

What is inside

One library, two runtimes

Role sync

Add, remove and reconcile Discord roles for guild members via the REST API, with rate-limit-aware retry.

Permissions

Compute and check member permission bitfields, with administrator and guild-owner short circuits.

Webhooks

Post messages and rich embeds to Discord webhooks, honoring 429 retry windows and backing off on errors.

Player data

Map FiveM identifiers (license:, steam:, discord:) to records with in-memory plus JSON persistence.

FiveM Lua bridge

The same role sync, guild checks and webhook logging in-game via PerformHttpRequest. ox_lib friendly, not required.

License client

Includes the client our paid products use to validate keys, so you can see the whole pattern end to end.

Building a real server? Pair it with the AL License System and the AL Store, then let Overnight.Host run the lot for you.