Skip to content

Commit

Permalink
Update Server.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsikNox committed Sep 23, 2019
1 parent ad2e5c4 commit f647410
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/[esx]/[discord]/DiscordBot/SERVER/Server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ AddEventHandler('DiscordBot:ToDiscord', function(WebHook, Name, Message, Image,
print('ToDiscord event called without a specified webhook!')
return nil
end

if Image:lower() == 'steam' then
Image = UserAvatar
--if GetIDFromSource('steam', Source) then
if not Source == 0 and GetIDFromSource('steam', Source) then
PerformHttpRequest('http://steamcommunity.com/profiles/' .. tonumber(GetIDFromSource('steam', Source), 16) .. '/?xml=1', function(Error, Content, Head)
local Source = source
if GetIDFromSource('steam', Source) then
PerformHttpRequest('http://steamcommunity.com/profiles/' .. tonumber(GetIDFromSource('steam', Source), 32) .. '/?xml=1', function(Error, Content, Head)
local SteamProfileSplitted = stringsplit(Content, '\n')
for i, Line in ipairs(SteamProfileSplitted) do
if Line:find('<avatarFull>') then
Expand Down

0 comments on commit f647410

Please sign in to comment.