Sorry, Tiago. This is why you should use multiple commits.
This commit is contained in:
		| @@ -8,7 +8,7 @@ local triggers = { | ||||
| local action = function(msg) | ||||
|  | ||||
| 	-- Filthy hack, but here is where we'll stop forwarded messages from hitting | ||||
| 	-- Other plugins. | ||||
| 	-- other plugins. | ||||
| 	if msg.forward_from then return end | ||||
|  | ||||
| 	local output = config.about_text .. '\nBased on @otouto v'..version..' by topkecleon.' | ||||
|   | ||||
| @@ -25,6 +25,8 @@ local action = function(msg) | ||||
| 		output = firstnames[math.random(#firstnames)] .. ' ' .. lastnames[math.random(#lastnames)] | ||||
| 	end | ||||
|  | ||||
| 	output = '_' .. output .. '_' | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, nil, true) | ||||
|  | ||||
| end | ||||
|   | ||||
| @@ -28,7 +28,7 @@ local action = function(msg) | ||||
| 		return | ||||
| 	end | ||||
|  | ||||
| 	output = '*Result:* `' .. output .. '`' | ||||
| 	output = '`' .. output .. '`' | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, msg.message_id, true) | ||||
|  | ||||
|   | ||||
| @@ -418,7 +418,7 @@ local commits = { | ||||
|  | ||||
| local action = function(msg) | ||||
|  | ||||
| 	local output = '*Commit:* '..commits[math.random(#commits)] | ||||
| 	local output = '`'..commits[math.random(#commits)]..'`' | ||||
| 	sendMessage(msg.chat.id, output, true, nil, true) | ||||
|  | ||||
| end | ||||
|   | ||||
| @@ -15,13 +15,14 @@ local action = function(msg) | ||||
| 	if not input then | ||||
| 		sendMessage(msg.chat.id, doc, true, msg.message_id, true) | ||||
| 	else | ||||
| 		input = markdown_escape(input) | ||||
| 		local output | ||||
| 		if msg.chat.type == 'supergroup' then | ||||
| 			output = 'Echo:\n"' .. markdown_escape(input) .. '"' | ||||
| 			output = '*Echo:*\n"' .. input .. '"' | ||||
| 		else | ||||
| 			output = latcyr(input) | ||||
| 		end | ||||
| 		sendMessage(msg.chat.id, output, true) | ||||
| 		sendMessage(msg.chat.id, output, true, nil, true) | ||||
| 	end | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -64,7 +64,7 @@ local action = function(msg) | ||||
|  | ||||
|  | ||||
| 	if msg.text:match('nsfw') then | ||||
| 		output = 'NSFW Image ' .. output | ||||
| 		output = '*NSFW*\n' .. output | ||||
| 		sendMessage(msg.chat.id, output, true, nil, true) | ||||
| 	else | ||||
| 		sendMessage(msg.chat.id, output, false, nil, true) | ||||
|   | ||||
| @@ -13,8 +13,6 @@ local triggers = { | ||||
|  | ||||
| local action = function(msg) | ||||
|  | ||||
| 	sendChatAction(msg.chat.id, "find_location") | ||||
|  | ||||
| 	local input = msg.text:input() | ||||
| 	if not input then | ||||
| 		if msg.reply_to_message and msg.reply_to_message.text then | ||||
|   | ||||
| @@ -11,6 +11,8 @@ local triggers = { | ||||
|  | ||||
| local action = function(msg) | ||||
|  | ||||
| 	sendChatAction(msg.chat.id, 'typing') | ||||
|  | ||||
| 	local jstr, res = HTTPS.request('https://hacker-news.firebaseio.com/v0/topstories.json') | ||||
| 	if res ~= 200 then | ||||
| 		sendReply(msg, config.errors.connection) | ||||
|   | ||||
| @@ -35,10 +35,10 @@ local action = function(msg) | ||||
| 		return | ||||
| 	end | ||||
|  | ||||
| 	local output = '[' .. jdat.Title .. '](http://imdb.com/title/' | ||||
| 	output = output .. jdat.imdbID .. ') ('.. jdat.Year ..')\n' | ||||
| 	local output = '*' .. jdat.Title .. ' ('.. jdat.Year ..')*\n' | ||||
| 	output = output .. jdat.imdbRating ..'/10 | '.. jdat.Runtime ..' | '.. jdat.Genre ..'\n' | ||||
| 	output = output .. '`' .. jdat.Plot .. '`' | ||||
| 	output = output .. '_' .. jdat.Plot .. '_\n' | ||||
| 	output = output .. '[Read more.](http://imdb.com/title/' .. jdat.imdbID .. ')' | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, nil, true) | ||||
|  | ||||
|   | ||||
| @@ -39,7 +39,7 @@ local action = function(msg) | ||||
| 		output = target.name .. '\'s nickname has been set to "' .. input .. '".' | ||||
| 	end | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, nil, true) | ||||
| 	sendReply(msg, output) | ||||
|  | ||||
| end | ||||
|  | ||||
|   | ||||
| @@ -12,8 +12,8 @@ local action = function(msg) | ||||
| 	local m1, m2 = msg.text:match('^/?s/(.-)/(.-)/?$') | ||||
| 	if not m2 then return true end | ||||
| 	output = output:gsub(m1, m2) | ||||
| 	output = '*Did you mean:*\n"' .. output:sub(1, 4000) .. '"' | ||||
| 	sendMessage(msg.chat.id, output, true, msg.message_id, true) | ||||
| 	output = 'Did you mean:\n"' .. output:sub(1, 4000) .. '"' | ||||
| 	sendReply(msg.reply_to_message, output) | ||||
|  | ||||
| end | ||||
|  | ||||
|   | ||||
| @@ -6,7 +6,8 @@ local triggers = { | ||||
| } | ||||
|  | ||||
| local action = function(msg) | ||||
| 	sendMessage(msg.chat.id, msg.text_lower:match('^/ping') and '*Pong!*' or '*Annyong.*', true, nil, true) | ||||
| 	local output = msg.text_lower:match('^/ping') and 'Pong!' or 'Annyong.' | ||||
| 	sendMessage(msg.chat.id, output) | ||||
| end | ||||
|  | ||||
| return { | ||||
|   | ||||
| @@ -43,7 +43,7 @@ local action = function(msg) | ||||
| 	end | ||||
| 	local output = '`' .. os.date('%I:%M %p\n', timestamp) .. os.date('%A, %B %d, %Y\n', timestamp) .. jdat.timeZoneName .. ' (UTC' .. utcoff .. ')' .. '`' | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, nil, true) | ||||
| 	sendMessage(msg.chat.id, output, true, msg.message_id, true) | ||||
|  | ||||
| end | ||||
|  | ||||
|   | ||||
| @@ -36,7 +36,7 @@ local action = function(msg) | ||||
| 	end | ||||
|  | ||||
| 	local output = jdat.text[1] | ||||
| 	output = '*Translation:*\n"' .. output .. '"' | ||||
| 	output = '*Translation:*\n"' .. markdown_escape(output) .. '"' | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, msg.message_id, true) | ||||
|  | ||||
|   | ||||
| @@ -48,7 +48,7 @@ local action = function(msg) | ||||
|  | ||||
| 	local celsius = string.format('%.2f', jdat.main.temp - 273.15) | ||||
| 	local fahrenheit = string.format('%.2f', celsius * (9/5) + 32) | ||||
| 	local output = celsius .. '°C | ' .. fahrenheit .. '°F, ' .. jdat.weather[1].description .. '.' | ||||
| 	local output = '`' .. celsius .. '°C | ' .. fahrenheit .. '°F, ' .. jdat.weather[1].description .. '.`' | ||||
|  | ||||
| 	sendMessage(msg.chat.id, output, true, msg.message_id, true) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 topkecleon
					topkecleon