diff --git a/miku/plugins/echo.lua b/miku/plugins/echo.lua index a26feb3..525a3ad 100644 --- a/miku/plugins/echo.lua +++ b/miku/plugins/echo.lua @@ -35,6 +35,12 @@ function echo:action(msg) output = '*Echo:*\n"' .. utilities.md_escape(input) .. '"' utilities.send_message(self, msg.chat.id, output, true, nil, true) return + elseif msg.chat.type == 'group' then + local b = 1 + while b ~= 0 do + input = utilities.trim(input) + input,b = input:gsub('^/+','') + end end utilities.send_message(self, msg.chat.id, input, true, nil, true) end diff --git a/miku/utilities.lua b/miku/utilities.lua index 7a5d838..46ece97 100644 --- a/miku/utilities.lua +++ b/miku/utilities.lua @@ -730,7 +730,7 @@ function cache_data(plugin, query, data, timeout, typ, hash_field) redis:sadd(hash, str) end else - redis:hset(hash, hash_field, data) + redis:hmset(hash, data) end if timeout then redis:expire(hash, timeout)