Skip to content

Commit

Permalink
prepping for ccDiscordWrapper v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
69u committed Jul 25, 2023
1 parent 3c18e0d commit 043d821
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ games { 'rdr3', 'gta5' }

author 'Concept Collective <contact@conceptcollective.net>'
description 'A FiveM RP Chat resource utilising cc-chat.'
version '1.4.1'
version '1.4.2'

lua54 'yes'

Expand Down
18 changes: 9 additions & 9 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RegisterCommand('ooc', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -92,7 +92,7 @@ AddEventHandler('chatMessage', function(source, name, message)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -126,7 +126,7 @@ RegisterCommand('me', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -160,7 +160,7 @@ RegisterCommand('do', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -193,7 +193,7 @@ RegisterCommand('news', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -226,7 +226,7 @@ RegisterCommand('ad', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -259,7 +259,7 @@ RegisterCommand('twt', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -292,7 +292,7 @@ RegisterCommand('anon', function(source, args, rawCommand)
return
end
if config.discord then
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source).."] "..GetPlayerName(source)
playerName = "["..exports.ccDiscordWrapper:getPlayerDiscordHighestRole(source, "name").."] "..GetPlayerName(source)
elseif config.esx then
local xPlayer = ESX.GetPlayerFromId(source)
playerName = xPlayer.getName()
Expand Down Expand Up @@ -324,7 +324,7 @@ if config.connectionMessages then
playerName = GetPlayerName(source)
TriggerClientEvent('cc-rpchat:addMessage', -1, '#e74c3c', 'fa-solid fa-minus', playerName..' left (' .. reason .. ')', '', false)
if config.DiscordWebhook then
sendToDiscord(13644844, playerName.." has disconnected!", "**Identifiers**: \n"..GetPlayerIdentifier(source, 0).."\n"..GetPlayerIdentifier(source, 1).."\n<@"..GetPlayerIdentifier(source, 2):sub(9)..">\n"..GetPlayerIdentifier(source, 3), 'add a custom footer')
sendToDiscord(13644844, playerName.." has disconnected ("..reason..")!", "**Identifiers**: \n"..GetPlayerIdentifier(source, 0).."\n"..GetPlayerIdentifier(source, 1).."\n<@"..GetPlayerIdentifier(source, 2):sub(9)..">\n"..GetPlayerIdentifier(source, 3), 'add a custom footer')
end
end)
end
Expand Down

0 comments on commit 043d821

Please sign in to comment.