-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver_discordlog.lua
More file actions
31 lines (28 loc) · 917 Bytes
/
server_discordlog.lua
File metadata and controls
31 lines (28 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- Insert you Discord Webhook here
local webhookLink = ""
function sendDiscordLog(name, item, count, itemType)
if Config.DiscordLog then
local countName
if itemType == 'item' then
countName = "Count"
elseif itemType == 'weapon' then
countName = "Ammo"
end
local botColor = Config.botColor
local botName = Config.botName
local botAvatar = Config.botAvatar
local title = "MSK Crafting"
local description = Config.botDescription
local fields = {
{name = "Name", value = name, inline = false},
{name = "Item", value = item, inline = true},
{name = countName, value = count, inline = true},
}
local footer = {
text = "© MSK Scripts",
link = "https://i.imgur.com/PizJGsh.png"
}
local time = "%d/%m/%Y %H:%M:%S" -- format: "day/month/year hour:minute:second"
MSK.AddWebhook(webhookLink, botColor, botName, botAvatar, title, description, fields, footer, time)
end
end