From 91d60ba6d79a85801da58bca56100cce32244433 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 14 Aug 2020 03:22:40 +0100 Subject: [PATCH] Fixed game time in discord alerts --- modules/addons/discord-alerts.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/addons/discord-alerts.lua b/modules/addons/discord-alerts.lua index 6219f426..f6460792 100644 --- a/modules/addons/discord-alerts.lua +++ b/modules/addons/discord-alerts.lua @@ -31,8 +31,8 @@ local function emit_event(args) color = to_hex(color) end - local tick = args.tick or 0 - local tick_formated = format_time(tick, {hours = true, minutes = true, string = true, long = true}) + local tick = args.tick or game.tick + local tick_formatted = format_time(tick, {hours = true, minutes = true, string = true, long = true}) local players_online = 0 local admins_online = 0 @@ -46,7 +46,7 @@ local function emit_event(args) local done = {title=true, color=true, description=true} local fields = {{ 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