Sleep gefixt
This commit is contained in:
parent
000186f6a7
commit
8eaa7c15f5
@ -1,15 +1,15 @@
|
||||
require "socket"
|
||||
|
||||
local function sleep(sec)
|
||||
socket.select(nil, nil, sec)
|
||||
local function sleep(n)
|
||||
os.execute("sleep " .. tonumber(n))
|
||||
end
|
||||
|
||||
local function run(msg, matches)
|
||||
|
||||
print('Schlafe... ')
|
||||
|
||||
-- Set delay in seconds (10 = 10 seconds)
|
||||
local delay = 60
|
||||
-- Delay in seconds (10 = 10 seconds)
|
||||
local delay = matches[1]
|
||||
sleep(delay)
|
||||
|
||||
return 'Bin wieder da!'
|
||||
@ -19,7 +19,8 @@ end
|
||||
return {
|
||||
description = "Setzt den Bot in schlaf",
|
||||
usage = {"/sleep"},
|
||||
patterns = {"^/[Ss][Ll][Ee][Ee][Pp]$"},
|
||||
run = run
|
||||
patterns = {"^/[Ss][Ll][Ee][Ee][Pp] (.*)$"},
|
||||
run = run,
|
||||
privileged = true
|
||||
}
|
||||
--by Akamaru [https://ponywave.de]
|
Reference in New Issue
Block a user