Setup

STEP 1: Create A Webhook

If you want System Infos, Killing Logs and Chat Message notifications.

  • Create A Discord Channel Named “System Logs” or “FiveM Logs”
  • Go To The Channel Settings & Select “Integrations” then “Webhooks”
  • Click On “Create Webhook” and Set Your Bot Name & Picture
  • Copy Your Webhook URL & Save It for Later
  • Save & Profit

STEP 2: Add your Webhook

If you want System Infos, Killing Logs and Chat in three channels, replace the webhooks links I have in lines 1, 2 & 3 with the webhooks link for each channel. Otherwise, create just one Webhook and replace these 3 lines with that webhook

  • First of all, create a Discord Webhook, if not already done. See “STEP 2”
  • Copy the link of the Webhook
  • Open the server/s_config.lua
  • Add your webhooks to their respective lines
  • Save & Profit

STEP 3: Configuring Version Checks

Show version checks in server log when the resource starts (will till you if the resource is up to date)

  • Head to the settings.lua
  • Find UpdateCheck on line 12
  • Configure to your liking
  • Save and profit

If you want to disable version checks you should set this to false


STEP 4: Configuring Message Embeds

Send log messages as an Embed Message in Discord

  • Head to the settings.lua
  • Find UseEmbeds on line 15
  • Configure to your liking
  • Save and profit

STEP 5: Call the Webhook event from another resource

Simply use this:

— Available Channels: ‘chat’ or ‘system’ or ‘kill’

TriggerEvent('FiveM2Discord:SendWebhookLogs', 'WHICH_CHANNEL', 'NAME', 'MESSAGE', 'IMAGE_URL', true)

The boolean always has to be true, when calling FiveM2Discord:SendWebhookLogs with the channel names (‘chat’, ‘system’ and ‘kill’)

Additionally you can also call the webhooks from another resource using exports

exports['fivem2discord']:SendWebhookLogs('WHICH_CHANNEL', 'NAME', 'MESSAGE', 'IMAGE_URL', true)

STEP 6: Changing the System Avatar


STEP 7: Changing the User Avatar


STEP 8: Changing the System Name

  • Open the settings.lua
  • Replace “SYSTEM” at line 7 with your preferred name
  • Save & Profit

STEP 9: Specify Special Commands

  • Open the settings.lua
  • Add (or remove) the Command in the SpecialCommands Table, in the given format
  • Save & Profit

STEP 10: Blacklist Commands

  • Open the settings.lua
  • Add (or remove) the Command in the BlacklistedCommands Table, in the given format
  • Save & Profit

STEP 11: Specify Commands which have their own webhook

  • Open the settings.lua
  • Add (or remove) the Command in the OwnWebhookCommands Table, in the given format
  • Save & Profit

STEP 12: Specify TTS Commands

  • Open the settings.lua
  • Add (or remove) the Command in the TTSCommands Table, in the given format
  • Save & Profit


About


This site contains Documentation for all of the Toxic Development Discord and FiveM Projects.
Built with using