mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Fixed discord alert colours
This commit is contained in:
@@ -20,7 +20,7 @@ local function to_hex(color)
|
||||
return hex_digits:sub(major,major)..hex_digits:sub(minor,minor)
|
||||
end
|
||||
|
||||
return hex(color.r)..hex(color.g)..hex(color.b)
|
||||
return '0x'..hex(color.r)..hex(color.g)..hex(color.b)
|
||||
end
|
||||
|
||||
local function emit_event(args)
|
||||
@@ -133,24 +133,24 @@ end
|
||||
if config.player_jail then
|
||||
local Jail = require 'modules.control.jail'
|
||||
Event.add(Jail.events.on_player_jailed,function(event)
|
||||
local player_name = get_player_name(event)
|
||||
local player_name,by_player_name = get_player_name(event)
|
||||
emit_event{
|
||||
title='Jail',
|
||||
description='A player has been jailed',
|
||||
color=Colors.yellow,
|
||||
['Player:']='<inline>'..player_name,
|
||||
['By:']='<inline>'..event.by_player_name,
|
||||
['By:']='<inline>'..by_player_name,
|
||||
['Reason:']=event.reason
|
||||
}
|
||||
end)
|
||||
Event.add(Jail.events.on_player_unjailed,function(event)
|
||||
local player_name = get_player_name(event)
|
||||
local player_name,by_player_name = get_player_name(event)
|
||||
emit_event{
|
||||
title='Unjail',
|
||||
description='A player has been unjailed',
|
||||
color=Colors.green,
|
||||
['Player:']='<inline>'..player_name,
|
||||
['By:']='<inline>'..event.by_player_name
|
||||
['By:']='<inline>'..by_player_name
|
||||
}
|
||||
end)
|
||||
end
|
||||
@@ -159,24 +159,24 @@ end
|
||||
if config.player_temp_ban then
|
||||
local Jail = require 'modules.control.jail'
|
||||
Event.add(Jail.events.on_player_temp_banned,function(event)
|
||||
local player_name = get_player_name(event)
|
||||
local player_name,by_player_name = get_player_name(event)
|
||||
emit_event{
|
||||
title='Temp Ban',
|
||||
description='A player has been temp banned',
|
||||
color=Colors.red,
|
||||
['Player:']='<inline>'..player_name,
|
||||
['By:']='<inline>'..event.by_player_name,
|
||||
['By:']='<inline>'..by_player_name,
|
||||
['Reason:']=event.reason
|
||||
}
|
||||
end)
|
||||
Event.add(Jail.events.on_player_untemp_banned,function(event)
|
||||
local player_name = get_player_name(event)
|
||||
local player_name,by_player_name = get_player_name(event)
|
||||
emit_event{
|
||||
title='Temp Ban Removed',
|
||||
description='A player has been untemp banned',
|
||||
color=Colors.green,
|
||||
['Player:']='<inline>'..player_name,
|
||||
['By:']='<inline>'..event.by_player_name
|
||||
['By:']='<inline>'..by_player_name
|
||||
}
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user