diff --git a/plugins/sleep.lua b/plugins/sleep.lua new file mode 100644 index 0000000..37c04db --- /dev/null +++ b/plugins/sleep.lua @@ -0,0 +1,25 @@ +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] \ No newline at end of file