This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot-2/miku/plugins/surrogate.lua

18 lines
387 B
Lua
Raw Normal View History

local surrogate = {}
surrogate.triggers = {
"^/s (%-%d+) +(.+)$",
"^/s (%d+) +(.+)$",
"^/s (@[A-Za-z0-9-_-.-._.]+) +(.+)"
}
function surrogate:action(msg, config, matches)
if not is_sudo(msg, config) then
utilities.send_reply(self, msg, config.errors.sudo)
return
end
utilities.send_message(self, matches[1], matches[2], true, nil, true)
return
end
return surrogate