Configurations
Wasabi Chat (wasabi_chat) is configurable with configuration organized between the client, server, and shared between the two.
Clientβ
View Config
local config = {
-- Defaults until a player saves their own in Chat Settings
ui = {
defaultPosition = { x = 24, y = 24 }, -- Top-left position (screen pixels)
autoHideSeconds = 8, -- Auto-hide delay: 3 | 8 | 15 | 30
},
}
Modules.register('config', config, true)
Serverβ
View Config
local config = {
checkForUpdates = true, -- To enable the update checker (recommended)
staffGroups = { 'admin', 'god' }, -- Groups that can use staff chat and staff announcements
-- Requests allowed per player: maximum requests per intervalMS window.
-- Covers chat, Wrist Link, announcements and UI/service requests.
rateLimits = {
message = { intervalMS = 5000, maximum = 6 },
directMessage = { intervalMS = 5000, maximum = 6 },
wristLinkRelationship = { intervalMS = 5000, maximum = 8 },
wristLinkProfile = { intervalMS = 10000, maximum = 3 },
wristLinkSnapshot = { intervalMS = 5000, maximum = 4 },
wristLinkRead = { intervalMS = 5000, maximum = 10 }, -- Leaving a Wrist Link conversation marks it read
wristLinkSession = { intervalMS = 3000, maximum = 3 },
wristLinkKeepalive = { intervalMS = 60000, maximum = 6 }, -- Open watch pings (directMessages.keepaliveMS, 15 s minimum)
wristLinkLocation = { intervalMS = 60000, maximum = 12 },
-- Wrist Link accounts (only used when Config.wristLink.item.enabled is true)
wristLinkAccountCreate = { intervalMS = 60000, maximum = 3 },
wristLinkAccountSignIn = { intervalMS = 60000, maximum = 5 }, -- Failed and successful sign-ins
wristLinkAccountSignOut = { intervalMS = 10000, maximum = 3 },
wristLinkAccountPin = { intervalMS = 60000, maximum = 6 }, -- PIN tries on someone else's watch (plus 5 wrong per account = 5 min lock)
wristLinkAccountSettings = { intervalMS = 60000, maximum = 5 }, -- Set PIN, change password, change PIN
jobAnnouncement = { intervalMS = 30000, maximum = 1 }, -- /jobannounce
staffAnnouncement = { intervalMS = 30000, maximum = 1 }, -- /announce
bootstrap = { intervalMS = 3000, maximum = 3 },
channelAccess = { intervalMS = 3000, maximum = 8 }, -- Bursts on load, job change and chat open
compatibility = { intervalMS = 3000, maximum = 4 },
bubble = { intervalMS = 5000, maximum = 4 }, -- /me, /do, /roll and /try
typing = { intervalMS = 2000, maximum = 3 }, -- Typing indicator start/stop (clients send about 1 per second)
},
-- Optional KLIPY GIF search. Needs your own KLIPY app key (Wasabi does not supply one).
-- The key is sent to the NUI and players can see it, so never use a key that must stay secret.
klipy = {
enabled = false,
appKey = '',
resultLimit = 24, -- Search results per page (KLIPY allows 8-50)
debounceMS = 350,
},
-- Sends one random message to all players every interval
automaticMessages = {
enabled = false,
intervalMinutes = 60, -- Whole minutes between messages (1-10080)
label = 'Server', -- Sender name shown with each message
messages = {
-- 'Remember to read the server rules.',
},
},
-- Server-wide notice when a player joins or leaves
connectionMessages = {
join = false,
quit = false,
},
-- /jobannounce: allowed statuses and who can send them
announcements = {
-- false disables a status. open = service available, closed = unavailable,
-- hiring = recruiting, event = promoting an event, general = anything else.
statuses = { open = true, closed = true, hiring = true, event = true, general = true },
staffBanner = 'banner-staff.png', -- Banners are .png file names in ui/build/assets/ (no folders or URLs)
-- Job names must match your server: minimum grade, on-duty requirement and banner
jobs = {
police = { label = 'Police', minimumGrade = 2, requireDuty = true, banner = 'banner-police.png' },
ambulance = { label = 'EMS', minimumGrade = 2, requireDuty = true, banner = 'banner-ems.png' },
mechanic = { label = 'Mechanic', minimumGrade = 2, requireDuty = true, banner = 'banner-mechanic.png' },
},
},
-- wasabi_chat:messageSent (server event for chat logs, see the Events page in the docs)
messageLog = {
logDirectMessages = false, -- true also fires it for private Wrist Link DMs (channel 'dm')
},
-- Staff mute commands (staffGroups, the console or the ace command.<name> can use them)
-- /mute <id> [minutes] [reason], /unmute <id or identifier>, /mutes (private list)
mutes = {
persist = true, -- Keep mutes in the wasabi_chat_mutes table (survive reconnects and restarts)
defaultMinutes = 0, -- /mute without minutes: 0 = until /unmute
cleanupMinutes = 10, -- How often expired mutes are deleted from the database
commands = { mute = 'mute', unmute = 'unmute', list = 'mutes' }, -- false disables a command
},
-- Slow mode: seconds each player waits between their messages in a channel (0 = off).
-- Covers chat, modes and /say, /me /do /roll /try (local) and Wrist Link DMs (dm). Staff (staffGroups)
-- and players with the ace wasabichat.bypass skip it (add_ace group.mod wasabichat.bypass allow).
-- /slowmode <channel> <seconds> (staff, like /mute) changes it until the next restart (not saved).
-- The rateLimits above still apply on top as the hard flood guard.
slowMode = {
['local'] = 0, ooc = 3, staff = 0, groups = 0, dm = 0,
command = 'slowmode', -- false disables the command
},
-- Word filter for player messages (scripts and exports are never filtered).
-- Case-insensitive; catches leetspeak (sh1t, a$$), repeated letters (fuuuck) and spaced letters (f.u.c.k).
wordFilter = {
enabled = false,
action = 'censor', -- 'censor' replaces the letters with replacement, 'block' rejects the message
words = {
-- 'badword',
-- 'slur*', -- * at the end also matches words that start with it (slurs, slurring)
},
patterns = {
-- Advanced: Lua patterns matched on the lowercase text, e.g. '%f[%a]bad%a*'
},
wholeWords = true, -- true matches whole words only ("classic" never matches "ass"); false matches inside words
replacement = '*', -- One character, repeated for each censored letter
-- Where it applies (names = player names shown on messages; always censored, never blocked)
channels = { ['local'] = true, ooc = true, staff = false, groups = true, dm = true, bubbles = true, names = false },
bypassStaff = false, -- true lets staffGroups and the ace wasabichat.bypass skip the filter
notifyStaff = false, -- true sends staff a private System notice for each filtered message
},
-- @mentions in chat: @12 (server id), @Firstname, @First_Last or @"First Last". The mentioned player's
-- message is highlighted and plays a short sound (each player can turn both off in Chat Settings).
-- Typing @ suggests online players (only their server id and character name are sent).
mentions = {
enabled = true,
maxPerMessage = 5, -- Players pinged per message (more mentions in one message are ignored)
everyone = false, -- true lets staff (staffGroups) ping everyone who gets the message with @everyone or @here
},
-- Players blocked on the Wrist Link are also hidden in public chat for the player who blocked them:
-- their chat in every channel except staff, /say, modes, /me /do /roll /try (line and bubble), typing
-- indicator and @mentions. Silent (no placeholder). Scripts, announcements and system messages are never hidden.
blocking = {
hidePublicChat = true,
},
-- Built-in Discord chat log (server only, never sent to players).
-- Keep the webhook secret: set it in server.cfg with set wasabi_chat_webhook "https://discord.com/api/webhooks/..."
-- (the convar wins over the webhook string below).
discordLogs = {
enabled = false,
webhook = '',
username = 'Wasabi Chat',
avatarUrl = '', -- Optional https image for the webhook avatar
includeIdentifiers = false, -- Adds license/discord/steam/fivem identifiers (never IP) to player entries
mutes = true, -- Log /mute, /unmute and the mute exports
-- Wrist Link DMs are private. They are logged only when this AND messageLog.logDirectMessages are true;
-- tell your players if you turn it on.
directMessages = false,
channels = {
['local'] = true, ooc = true, staff = true, groups = true,
me = true, ['do'] = true, roll = true, try = true, -- /me, /do, /roll, /try in the Local tab
announcement = true, -- /announce, /jobannounce and sendAnnouncement
custom = false, -- Messages from other resources (sendMessage, sendToJob, sendNearby, showBubble)
system = false, -- Join/leave, automatic messages and addMessage
filtered = true, -- Messages the word filter censored or blocked (original text and words)
},
flushMS = 2000, -- Messages are batched: one request every flushMS with up to 10 entries
queueLimit = 200, -- Oldest entries are dropped when Discord cannot keep up
},
-- Private group channels. Players need a listed job, permission group or identifier.
groups = {
-- jobs = { name = minimum grade }. Identifiers are framework character IDs or FiveM identifiers (exact match).
-- Example identifiers: { 'ABC123', 'license:abc123', ['discord:123456'] = true }
-- mechanics = { label = 'Mechanics', jobs = { mechanic = 0 }, permissions = {}, identifiers = {} },
},
}
Modules.register('config', config, true)
Sharedβ
View Config
local config = {
language = 'en', -- Supported: en, cn, cs, da, de, es, fr, hi, it, jp, ko, nl, pl, pt, tw (unknown codes use en)
debug = false, -- Extra console output while troubleshooting
replaceDefaultChat = true, -- Hide FiveM's default text chat
openCommand = 'wsbchat_open', -- Command that opens chat
openKey = 'T', -- Default open key (players can rebind it)
historyLimit = 100, -- Recent chat messages kept until the resource restarts
messageLength = 500, -- Max length for chat, announcements, direct messages and the MOTD
-- Welcome message shown when chat loads
motd = {
enabled = false,
label = 'Message of the Day',
message = '', -- Empty uses qbx:motd. If both are empty, nothing is shown
},
proximityDistance = 20.0, -- Local chat range (game units)
themes = { 'floating', 'hybrid', 'streamer', 'sns' }, -- Themes players can pick in Chat Settings
defaultTheme = 'floating', -- Falls back to the first theme when unavailable
-- Licensed WOFF2 fonts: put the files in webfonts/, list them here, then restart.
-- id must be unique. file is a file name only (no URLs or folders).
-- fallback: 'sans-serif' | 'serif' | 'monospace'. weight: 100-900 in steps of 100.
customFonts = {
-- {
-- id = 'city-display', label = 'City Display', fallback = 'sans-serif',
-- faces = {
-- { file = 'city-display-regular.woff2', weight = 400 },
-- { file = 'city-display-bold.woff2', weight = 700 },
-- },
-- },
},
-- Channels players can use. Staff and private groups still need access.
channels = {
localChat = true,
ooc = true,
staff = true,
groups = true,
},
-- Wrist Link direct messages
directMessages = {
enabled = true,
sessionTimeoutMS = 300000, -- Close inactive Wrist Link sessions after this long (ms)
keepaliveMS = 60000, -- An open watch pings the server this often so it does not time out (ms, 15000 minimum)
historyLimit = 100, -- Newest direct messages shown per conversation
-- Wrist Link DMs are saved in the database (wasabi_chat_direct_messages) and survive restarts.
-- Messages older than this many days are deleted (checked at startup and every 3 hours).
-- 0 or false keeps them forever. Missing or invalid values use 30.
historyRetentionDays = 30,
},
-- Wrist Link: watch prop, animation, camera and panel
wristLink = {
enabled = true,
nearbyDistance = 25.0, -- Range for finding players and sending relationship requests
requestExpiryDays = 7, -- Unanswered friend requests are removed after this many days (0 or false keeps them)
command = 'wristlink',
commandKey = '', -- Default key ('' for none; the command and item still work)
sounds = {
defaultVolume = 0.35, -- Master volume until a player saves their own (0.0-1.0)
},
-- Open Wrist Link from an item (add it from _invItems first). Turns itself off when no supported inventory runs.
-- Item mode adds Wrist Link accounts: each character creates one account (unique display name,
-- password and PIN) and signs in on a watch. The command and key are not registered then (the
-- item is the way in; the openWristLink export also needs it). Another character holding the
-- watch needs its PIN and then uses Wrist Link as the watch owner.
item = {
enabled = true,
name = 'wristlink',
},
-- Local watch prop (enabled = false keeps animation, camera and UI without a prop)
prop = {
enabled = true,
models = {
male = 'wristlink_male',
female = 'wristlink_female',
},
boneId = 18905, -- Left hand
offset = { x = -0.0300, y = -0.0040, z = -0.0026 },
rotation = { x = 180.0, y = 0.0, z = 0.0 },
loadTimeoutMS = 5000,
collision = false,
},
-- Camera over the right shoulder toward the raised left wrist
camera = {
enabled = true,
boneId = 18905,
offset = { x = 0.8800, y = -0.6000, z = 0.9200 },
targetOffset = { x = 0.2400, y = 0.2930, z = 0.4050 },
fov = 42.3,
transitionMS = 450,
},
-- Wrist raise: enter plays once, hold loops while open, exit plays on close.
-- enabled = false keeps the prop, camera and UI without animation.
animation = {
enabled = true,
dictionary = 'wristlink_watchcheck',
blendIn = 4.0,
blendOut = -4.0,
loadTimeoutMS = 5000,
enterDurationMS = 1000,
exitDurationMS = 1000,
profiles = {
male = { enter = 'male_enter', hold = 'male_hold', exit = 'male_exit' },
female = { enter = 'female_enter', hold = 'female_hold', exit = 'female_exit' },
},
},
-- Watch panel layout, colours and text
visual = {
x = -176,
y = 17,
width = 440,
height = 520,
scale = 1.0,
rotateY = -14,
rotateX = 7,
rotateZ = 0,
perspective = 1170,
anchorX = 33,
anchorY = 38,
background = '#141d18',
opacity = 0.66,
border = '#bdcbb6',
borderOpacity = 0.22,
radius = 15,
shadow = 0.75,
textSize = 14,
accent = '#b2f36a',
incoming = '#ffffff',
incomingOpacity = 0.043137254901960784,
outgoing = '#b2f36a',
outgoingOpacity = 0.09411764705882353,
},
},
-- Messages other resources send through exports (registerSender / sendMessage).
customMessages = {
enabled = true,
-- Images (PNG, GIF, WebP...) must be https on one of these hosts or a subdomain; others are dropped
allowedImageDomains = { 'i.imgur.com', 'cdn.discordapp.com', 'media.discordapp.net', 'r2.fivemanage.com', 'fivemanage.com' },
-- Override or disable a sender by id: name, color ('#rrggbb'), channel ('system' | 'ooc' | 'local'),
-- banner ('.png' in ui/build/assets or an https URL on the hosts above), enabled
senders = {
-- diamond_casino = { name = 'My Casino', color = '#d4af37' },
-- noisy_script = { enabled = false },
},
},
-- Roleplay text above the player's head: /me, /do, /roll, /try and a typing indicator.
-- Nearby players in the same routing bucket with line of sight see it. Exports: custom_messages.lua docs.
bubbles = {
enabled = true,
distance = 15.0, -- Range for seeing bubbles (game units)
maxLength = 200, -- Max characters for /me, /do and /try text
showInChat = true, -- Also post the text to the Local tab (needs channels.localChat)
durationMS = 6000, -- Time on screen, plus perCharacterMS for each character, up to maxDurationMS
perCharacterMS = 40,
maxDurationMS = 12000,
maxPerPlayer = 3, -- Bubbles stacked above one player (the oldest fades out)
headOffset = 0.30, -- Height above the head (game units)
-- Another resource with the same command (qbx_core's /me, ox_lib addCommand, ESX, ...):
-- true = ours runs and our suggestion shows (re-registered whenever another resource starts or stops);
-- false = a command another resource registered first stays theirs (ours is skipped).
takeOver = true,
-- Command names have no slash. enabled = false never registers it (another resource keeps it).
commands = {
me = { enabled = true, name = 'me' }, -- * scratches his head
['do'] = { enabled = true, name = 'do' }, -- Β» The door is locked. Β«
roll = { enabled = true, name = 'roll', maxDice = 10, maxSides = 100 }, -- /roll 2d6 (default 1d6)
try = { enabled = true, name = 'try' }, -- 50/50 success or failure
},
-- "..." above players typing in the Local tab (the text itself is never sent)
typing = {
enabled = true,
distance = 15.0,
},
},
-- Allowed images and GIFs. Announcement banners are set in config/server (announcements).
mediaProviders = {
-- Public HTTPS images/GIFs (enable the provider after adding them)
configured = {
enabled = false,
assets = {
-- kind: 'image' | 'gif'. Optional picker: 'gif' | 'sticker'
-- launch = { label = 'Launch artwork', url = 'https://your-cdn.example/chat/launch.webp', kind = 'image', picker = 'sticker' },
-- celebrate = { label = 'Celebrate', url = 'https://your-cdn.example/chat/celebrate.gif', stillUrl = 'https://your-cdn.example/chat/celebrate.webp', kind = 'gif', picker = 'gif' },
},
},
},
}
Config = config
Modules.register('config', config)