mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Fixed game time in discord alerts
This commit is contained in:
@@ -31,8 +31,8 @@ local function emit_event(args)
|
|||||||
color = to_hex(color)
|
color = to_hex(color)
|
||||||
end
|
end
|
||||||
|
|
||||||
local tick = args.tick or 0
|
local tick = args.tick or game.tick
|
||||||
local tick_formated = format_time(tick, {hours = true, minutes = true, string = true, long = true})
|
local tick_formatted = format_time(tick, {hours = true, minutes = true, string = true, long = true})
|
||||||
|
|
||||||
local players_online = 0
|
local players_online = 0
|
||||||
local admins_online = 0
|
local admins_online = 0
|
||||||
@@ -46,7 +46,7 @@ local function emit_event(args)
|
|||||||
local done = {title=true, color=true, description=true}
|
local done = {title=true, color=true, description=true}
|
||||||
local fields = {{
|
local fields = {{
|
||||||
name='Server Details',
|
name='Server Details',
|
||||||
value=string.format('Server name: ${serverName} Players: %d Admins: %d Time: %s', players_online, admins_online, tick_formated)
|
value=string.format('Server name: ${serverName} Players: %d Admins: %d Time: %s', players_online, admins_online, tick_formatted)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
for key, value in pairs(args) do
|
for key, value in pairs(args) do
|
||||||
|
|||||||
Reference in New Issue
Block a user