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/plugins/sleep.lua
2015-11-27 22:11:13 +01:00

26 lines
452 B
Lua

require "socket"
local function sleep(n)
os.execute("sleep " .. tonumber(n))
end
local function run(msg, matches)
print('Schlafe... ')
-- Delay in seconds (10 = 10 seconds)
local delay = matches[1]
sleep(delay)
return 'Bin wieder da!'
end
return {
description = "Setzt den Bot in schlaf",
usage = {"/sleep"},
patterns = {"^/[Ss][Ll][Ee][Ee][Pp] (.*)$"},
run = run,
privileged = true
}
--by Akamaru [https://ponywave.de]