Skip to content

Commit

Permalink
Online bold
Browse files Browse the repository at this point in the history
When the bot turns on, only ONLINE will appear bold
  • Loading branch information
Tazi0 committed May 22, 2019
1 parent 381c5bd commit a76e990
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Serverlogging/server.lua
Expand Up @@ -7,7 +7,7 @@ local DISCORD_IMAGE = "https://pbs.twimg.com/profile_images/847824193899167744/J

--DON'T EDIT BELOW THIS

PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = DISCORD_NAME, content = "**Discord Webhook is ONLINE**", avatar_url = DISCORD_IMAGE}), { ['Content-Type'] = 'application/json' })
PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = DISCORD_NAME, content = "Discord Webhook is **ONLINE**", avatar_url = DISCORD_IMAGE}), { ['Content-Type'] = 'application/json' })

AddEventHandler('chatMessage', function(source, name, message)

Expand Down Expand Up @@ -36,8 +36,11 @@ AddEventHandler('playerConnecting', function()
end)

AddEventHandler('playerDropped', function(reason)
--PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = DISCORD_NAME, content = "```fix\n".. GetPlayerName(source) .. " left ( ".. reason .. " )\n```", avatar_url = DISCORD_IMAGE}), { ['Content-Type'] = 'application/json' })
sendToDiscord("Server Logout", GetPlayerName(source) .. " has left the server. \n Reason: " .. reason, 16711680)
local color = 16711680
if string.match(reason, "Kicked") or string.match(reason, "Banned") then
color == 16007897
end
sendToDiscord("Server Logout", GetPlayerName(source) .. " has left the server. \n Reason: " .. reason, color)
end)

RegisterServerEvent('playerDied')
Expand Down

0 comments on commit a76e990

Please sign in to comment.