forked from Simnation/Main
ed
This commit is contained in:
parent
1032235744
commit
cb8b683d43
292 changed files with 15840 additions and 0 deletions
89
resources/[phone]/roadphone/server/serverAPI/webhooks.lua
Normal file
89
resources/[phone]/roadphone/server/serverAPI/webhooks.lua
Normal file
|
@ -0,0 +1,89 @@
|
|||
function messageWebhook(source, myPhone, phoneNumber, message)
|
||||
|
||||
discordLog(5763719, "Message", "**"..myPhone.."** sent a message to **"..phoneNumber.."**" .. "\n\n**Message:** " .. message, "RoadPhone", nil, Cfg.MessageWebhook, "Messages")
|
||||
|
||||
end
|
||||
|
||||
function messageGroup(source, number, groupid, message)
|
||||
|
||||
discordLog(5763719, "Message", "**"..number.."** sent a message to group **"..groupid.."**" .. "\n\n**Message:** " .. message, "RoadPhone", nil, Cfg.MessageWebhook, "Messages")
|
||||
|
||||
end
|
||||
|
||||
function connectWebhook(source, author, message, picture)
|
||||
|
||||
discordLog("1942002", "The User " .. author .. " has posted a new post!", message, "RoadPhone Connect", picture, Cfg.ConnectWebhook, "Connect")
|
||||
|
||||
end
|
||||
|
||||
function TweetWaveWebhook(source, author, message, image)
|
||||
|
||||
discordLog("1942002", "The User " .. author .. " has posted a new Tweet!", message, "RoadPhone TweetWave", image, Cfg.TweetWaveWebhook, "TweetWave")
|
||||
|
||||
end
|
||||
|
||||
function AdvertisingWebhook(source, number, title, text, picture)
|
||||
|
||||
discordLog("16776960", "Advertising", 'Number: ' .. number .. '\n' .. 'Title: ' .. title .. '\n' .. 'Text: ' .. text, "RoadPhone", picture, Cfg.AdvertisingWebhook, "Advertising")
|
||||
|
||||
|
||||
end
|
||||
|
||||
function cryptoExploitWebhook(xPlayer, amount, coinid)
|
||||
|
||||
discordLog("15548997", "Exploit", 'The user ' .. xPlayer.PlayerData.citizenid .. ' has tried to exploit the Crypto System. He tried to sell ( ' .. amount .. ' ) ' .. coinid .. '.', "RoadPhone", nil, Cfg.ExploitWebhook)
|
||||
|
||||
end
|
||||
function cryptoExploitWebhookBuy(xPlayer, amount, coinid)
|
||||
|
||||
discordLog("15548997", "Exploit", 'The user ' .. xPlayer.PlayerData.citizenid .. ' has tried to exploit the Crypto System. He tried to buy ( ' .. amount .. ' ) ' .. coinid .. '.', "RoadPhone", nil, Cfg.ExploitWebhook)
|
||||
|
||||
end
|
||||
|
||||
function bankWebhook(selfsource, targetsource, selfname, targetname, amount)
|
||||
|
||||
discordLog("5763719", "Bank", "Sender: " .. selfname .. "\n" .. "Receiver: " .. targetname .. "\n" .. "Amount: " .. amount, "RoadPhone - Bank", nil, Cfg.BankWebhook, "Bank")
|
||||
|
||||
end
|
||||
|
||||
function darkchatWebhook(xPlayer, groupname, message)
|
||||
|
||||
discordLog("2303786", "DarkChat", "**"..xPlayer.PlayerData.citizenid .."** sent a message to group **"..groupname.."**" .. "\n\n**Message:** " .. message, "RoadPhone", nil, Cfg.DarkchatWebhook, "DarkChat")
|
||||
|
||||
end
|
||||
|
||||
function callLog(caller, target, callerNumber, targetNumber, isAnonym)
|
||||
|
||||
isAnonym = isAnonym == 1 and "Yes" or "No"
|
||||
|
||||
if not target then
|
||||
target = {
|
||||
PlayerData = {
|
||||
charinfo = {
|
||||
firstname = "( Player is not online )"
|
||||
},
|
||||
citizenid = "( Player is not online )"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
discordLog("5763719", "Call", "**"..caller.PlayerData.charinfo.firstname.."** started a call to **"..target.PlayerData.charinfo.firstname.."**" .. "\n\n**Number from Caller:** " .. callerNumber .. "\n\n**Number from Target:** " .. targetNumber .. "\n\n**Call is Anonym:** " .. isAnonym .. "\n\n**Caller Identifier:** **" .. caller.PlayerData.citizenid .. "** \n\n**Target Identifier:** **" .. target.PlayerData.citizenid .. "**", "RoadPhone", nil, Cfg.CallWebhook)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function tweetWaveCommentLog(src, comment)
|
||||
|
||||
|
||||
discordLog("5763719", "TweetWave Comment", "Player Source: **" .. src .. '** \n CommentID: **' .. comment.id .. '** \n AuthorID: **' .. comment.authorId .. '** \n Author: **' .. comment.author .. '** \n Message: **' .. comment.message .. '** \n PostID: **' .. comment.postid .. '** \n', "RoadPhone", nil, Cfg.TweetWaveCommentsWebhook)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function connectCommentLog(src, comment)
|
||||
|
||||
|
||||
discordLog("5763719", "Connect Comment", "Player Source: **" .. src .. '** \n CommentID: **' .. comment.id .. '** \n AuthorID: **' .. comment.authorId .. '** \n Author: **' .. comment.author .. '** \n Message: **' .. comment.message .. '** \n PostID: **' .. comment.postid .. '** \n', "RoadPhone", nil, Cfg.ConnectCommentsWebhook)
|
||||
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue