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-08-17 02:30:34 +02:00

25 lines
420 B
Lua

require "socket"
local function sleep(sec)
socket.select(nil, nil, sec)
end
local function run(msg, matches)
print('Schlafe... ')
-- Set delay in seconds (10 = 10 seconds)
local delay = 60
sleep(delay)
return 'Bin wieder da!'
end
return {
description = "Setzt den Bot in schlaf",
usage = {"/sleep"},
patterns = {"^/[Ss][Ll][Ee][Ee][Pp]$"},
run = run
}
--by Akamaru [https://ponywave.de]