Модуль:Infoboxes: различия между версиями

нет описания правки
Нет описания правки
Метка: отменено
Нет описания правки
 
(не показаны 3 промежуточные версии этого же участника)
Строка 2: Строка 2:
function p.player(frame)
function p.player(frame)
local name = frame.args[1]
local name = frame.args[1]
local role = (frame.args["role"] == nil or frame.args["role"] == '') and nil or frame.args["role"]
local role = frame.args["role"]
local discord = (frame.args["discord"] == nil or frame.args["discord"] == '') and nil or frame.args["discord"]
local discord = frame.args["discord"]
local tabl = ""
local tabl = ""
if discord ~= nil or role ~= nil then
if discord ~= nil or role ~= nil then
if role ~= nil then
if role ~= nil and role:gsub("^%s*(.-)%s*$", "%1") ~= "" then
tabl = tabl.."|'''Роль'''||"..role.."\n|-\n"
tabl = tabl.."|'''Роль'''||"..role.."\n|-\n"
end
end
if discord ~= nil then
if discord ~= nil and discord:gsub("^%s*(.-)%s*$", "%1") ~= "" then
tabl = tabl.."|'''Discord'''||"..discord.."\n|-\n"
tabl = tabl.."|'''Discord'''||"..discord.."\n|-\n"
end
end