2018-09-21 19:48:12 +01:00
|
|
|
local Public = {}
|
|
|
|
|
2018-10-03 21:03:19 +01:00
|
|
|
local raw_print = print
|
|
|
|
function print(str)
|
|
|
|
raw_print('[PRINT] ' .. str)
|
|
|
|
end
|
|
|
|
|
2018-09-22 17:41:20 +01:00
|
|
|
local discord_tag = '[DISCORD]'
|
|
|
|
local discord_raw_tag = '[DISCORD-RAW]'
|
2018-10-03 21:03:19 +01:00
|
|
|
local discord_bold_tag = '[DISCORD-BOLD]'
|
2018-09-22 17:41:20 +01:00
|
|
|
local discord_admin_tag = '[DISCORD-ADMIN]'
|
|
|
|
local discord_admin_raw_tag = '[DISCORD-ADMIN-RAW]'
|
|
|
|
local discord_embed_tag = '[DISCORD-EMBED]'
|
|
|
|
local discord_embed_raw_tag = '[DISCORD-EMBED-RAW]'
|
|
|
|
local discord_admin_embed_tag = '[DISCORD-ADMIN-EMBED]'
|
|
|
|
local discord_admin_embed_raw_tag = '[DISCORD-ADMIN-EMBED-RAW]'
|
2018-10-02 00:31:46 +01:00
|
|
|
local regular_promote_tag = '[REGULAR-PROMOTE]'
|
|
|
|
local regular_deomote_tag = '[REGULAR-DEOMOTE]'
|
2018-09-21 19:48:12 +01:00
|
|
|
|
2018-10-03 21:03:19 +01:00
|
|
|
Public.raw_print = raw_print
|
|
|
|
|
2018-09-21 19:48:12 +01:00
|
|
|
function Public.to_discord(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_tag .. message)
|
2018-09-21 19:48:12 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function Public.to_discord_raw(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_raw_tag .. message)
|
|
|
|
end
|
|
|
|
|
|
|
|
function Public.to_discord_bold(message)
|
|
|
|
raw_print(discord_bold_tag .. message)
|
2018-09-21 19:48:12 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function Public.to_admin(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_admin_tag .. message)
|
2018-09-21 19:48:12 +01:00
|
|
|
end
|
|
|
|
|
2018-09-22 17:41:20 +01:00
|
|
|
function Public.to_admin_raw(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_admin_raw_tag .. message)
|
2018-09-22 17:41:20 +01:00
|
|
|
end
|
|
|
|
|
2018-09-21 19:48:12 +01:00
|
|
|
function Public.to_discord_embed(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_embed_tag .. message)
|
2018-09-21 19:48:12 +01:00
|
|
|
end
|
|
|
|
|
2018-09-22 17:41:20 +01:00
|
|
|
function Public.to_discord_embed_raw(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_embed_raw_tag .. message)
|
2018-09-22 17:41:20 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function Public.to_admin_embed(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_admin_embed_tag .. message)
|
2018-09-22 17:41:20 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function Public.to_admin_embed_raw(message)
|
2018-10-03 21:03:19 +01:00
|
|
|
raw_print(discord_admin_embed_raw_tag .. message)
|
2018-09-22 17:41:20 +01:00
|
|
|
end
|
|
|
|
|
2018-10-02 00:31:46 +01:00
|
|
|
function Public.regular_promote(target, promotor)
|
2018-10-03 21:03:19 +01:00
|
|
|
local control_message = table.concat {regular_promote_tag, target, ' ', promotor}
|
|
|
|
local discord_message = table.concat {discord_bold_tag, promotor .. ' promoted ' .. target .. ' to regular.'}
|
|
|
|
|
|
|
|
raw_print(control_message)
|
|
|
|
raw_print(discord_message)
|
2018-10-02 00:31:46 +01:00
|
|
|
end
|
|
|
|
|
2018-10-03 21:03:19 +01:00
|
|
|
function Public.regular_deomote(target, demotor)
|
|
|
|
local discord_message = table.concat {discord_bold_tag, target, ' was demoted from regular by ', demotor, '.'}
|
|
|
|
|
|
|
|
raw_print(regular_deomote_tag .. target)
|
|
|
|
raw_print(discord_message)
|
2018-10-02 00:31:46 +01:00
|
|
|
end
|
|
|
|
|
2018-09-21 19:48:12 +01:00
|
|
|
return Public
|