Luarun-Fix 2

This commit is contained in:
Andreas Bielawski 2016-08-26 17:42:40 +02:00
parent 335994f0d7
commit 4d3a67fe5f

View File

@ -23,7 +23,7 @@ function luarun:action(msg, config)
local input = utilities.input(msg.text) local input = utilities.input(msg.text)
if not input then if not input then
utilities.send_reply(self, msg, 'Bitte gebe einen Befehl ein.') utilities.send_reply(msg, 'Bitte gebe einen Befehl ein.')
return return
end end
@ -39,8 +39,8 @@ function luarun:action(msg, config)
local URL = require('socket.url') local URL = require('socket.url')
local http = require('socket.http') local http = require('socket.http')
local https = require('ssl.https') local https = require('ssl.https')
return function (self, msg, config) ]] .. input .. [[ end return function (msg, config) ]] .. input .. [[ end
]] )()(self, msg, config) ]] )()(msg, config)
if output == nil then if output == nil then
output = 'Ausgeführt!' output = 'Ausgeführt!'
else else
@ -52,7 +52,7 @@ function luarun:action(msg, config)
end end
output = '```\n' .. tostring(output) .. '\n```' output = '```\n' .. tostring(output) .. '\n```'
end end
utilities.send_message(self, msg.chat.id, output, true, msg.message_id, true) utilities.send_message(msg.chat.id, output, true, msg.message_id, true)
end end