七日内新公告:全站维护公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Module:链入文件

猛汉♂百科,万男皆可猛的百科全书!转载请标注来源页面的网页链接,并声明引自猛汉百科。内容不可商用。
跳转到导航 跳转到搜索
模块文档  [创建] [刷新]
local module = {};

module.main = function(frame)
	if frame.args[1] ~= nil and frame.args[1] ~= '' then
		local title = mw.title.new('File:'..frame.args[1]);
		if title.file['exists'] then
			local linkToFileReturn = '', title.file;
			return linkToFileReturn;
		else
			error('没有“File:' .. frame.args[1] .. '”这个文件,请检查文件名是否正确!');
		end
	else
		error('文件名为空,请输入文件名!');
	end
end

return module;