BenzyChat — Integrations
BenzyChat is a drop-in replacement for the stock chat, so most servers add it and change nothing else. This covers the one install step, why other resources keep working, and how to push messages yourself.
Contents
- Replacing the stock chat
- Other resources keep working
- Pushing messages yourself
- Logging to Discord
- Making it your own
Replacing the stock chat
BenzyChat's manifest declares provide 'chat'. That aliases it as the chat provider, so any resource that lists dependency 'chat' is satisfied by BenzyChat, and every chat:* event still fires.
Just start it — that's the only line you need:
# server.cfg
ensure BenzyChat
BenzyChat stops the built-in chat resource automatically whenever it starts (whatever the load order), so the two never run side by side and you don't have to edit server.cfg to remove it.
Other resources keep working
Because BenzyChat listens for the stock chat events, resources that talk to the chat need no changes:
- A resource that prints a line with
TriggerEvent('chat:addMessage', …)(orTriggerClientEvent('chat:addMessage', src, …)) shows it as a bubble. - A resource that registers a command with
TriggerEvent('chat:addSuggestion', '/cmd', …)gets it in BenzyChat's autocomplete. - A player's own commands from other resources (
/pay,/engine, …) still run — BenzyChat only handles its own commands and hands the rest off.
See EVENTS.md for the exact shapes.
Pushing messages yourself
If you'd rather push a message directly than fire a chat event, use the exports:
-- Client -> a bubble on this player
exports.BenzyChat:AddBubble({ name = 'Radio', label = 'disp', color = '#f0a020', scope = 'local', message = 'Copy that.' })
-- Server -> everyone
exports.BenzyChat:Broadcast({ scope = 'global', name = 'Server', label = 'info', color = '#3d9bff', message = 'Event starting now!' })
Guard the call with GetResourceState('BenzyChat') == 'started' if BenzyChat is optional, and fall back to chat:addMessage so your resource still works without it — see the worked example in EXPORTS.md.
Logging to Discord
Set a webhook and every message posts an embed with the command and scope. Fill Config.Webhooks.Local / .Global / .Plain (use the same URL for all three to log everything in one channel).
Player text only ever goes inside the embed, which Discord never turns into a mention, so a message containing @everyone can't ping.
Making it your own
Everything visual is in config.lua:
Config.Commands— the commands, their colors, labels, and ranges. Each gets an automatic global twin.Config.Bubbles/Config.Input— where the bubbles and typing box sit, and how long a bubble lasts.Config.Visibility— the default mode and the toggle key.Config.Theme— the surface color, text/name colors, accent, and radius. These drive the chat’s whole look, so it all restyles from here.
For deeper visual changes the markup and styles ship in an editable html/ folder — small, self-contained, and dependency-free. Open html/index.html in a browser to preview the look with sample messages.