diff --git a/otouto/plugins/luarun.lua b/otouto/plugins/luarun.lua index bcc8a05..eb8f206 100644 --- a/otouto/plugins/luarun.lua +++ b/otouto/plugins/luarun.lua @@ -23,7 +23,7 @@ function luarun:action(msg, config) local input = utilities.input(msg.text) 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 end @@ -35,15 +35,14 @@ function luarun:action(msg, config) local bot = require('otouto.bot') local bindings = require('otouto.bindings') 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 HTTP = require('socket.http') - local HTTPS = require('ssl.https') - return function (msg, config) ]] .. input .. [[ end - ]] )()(msg, config) + local http = require('socket.http') + local https = require('ssl.https') + return function (self, msg, config) ]] .. input .. [[ end + ]] )()(self, msg, config) if output == nil then - output = 'Done!' + output = 'Ausgeführt!' else if type(output) == 'table' then local s = luarun.serialize(output) @@ -53,9 +52,8 @@ function luarun:action(msg, config) end output = '```\n' .. tostring(output) .. '\n```' 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 -return luarun - +return luarun \ No newline at end of file