Fixe Luarun
This commit is contained in:
parent
4ad27bc405
commit
335994f0d7
@ -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(msg, 'Please enter a string to load.')
|
utilities.send_reply(self, msg, 'Bitte gebe einen Befehl ein.')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -35,15 +35,14 @@ function luarun:action(msg, config)
|
|||||||
local bot = require('otouto.bot')
|
local bot = require('otouto.bot')
|
||||||
local bindings = require('otouto.bindings')
|
local bindings = require('otouto.bindings')
|
||||||
local utilities = require('otouto.utilities')
|
local utilities = require('otouto.utilities')
|
||||||
local drua = require('otouto.drua-tg')
|
local json = require('dkjson')
|
||||||
local JSON = require('dkjson')
|
|
||||||
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 (msg, config) ]] .. input .. [[ end
|
return function (self, msg, config) ]] .. input .. [[ end
|
||||||
]] )()(msg, config)
|
]] )()(self, msg, config)
|
||||||
if output == nil then
|
if output == nil then
|
||||||
output = 'Done!'
|
output = 'Ausgeführt!'
|
||||||
else
|
else
|
||||||
if type(output) == 'table' then
|
if type(output) == 'table' then
|
||||||
local s = luarun.serialize(output)
|
local s = luarun.serialize(output)
|
||||||
@ -53,9 +52,8 @@ function luarun:action(msg, config)
|
|||||||
end
|
end
|
||||||
output = '```\n' .. tostring(output) .. '\n```'
|
output = '```\n' .. tostring(output) .. '\n```'
|
||||||
end
|
end
|
||||||
utilities.send_message(msg.chat.id, output, true, msg.message_id, true)
|
utilities.send_message(self, msg.chat.id, output, true, msg.message_id, true)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return luarun
|
return luarun
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user