-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrestart.coffee
43 lines (40 loc) · 1.33 KB
/
restart.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! ========================================
#! Restart
handler = (msg, match, Haruka) ->
force = match.input.tokenize()[1]
if msg.author.id in Haruka.config.ops
if /^(-f|--force)$/.test force
return msg.reply [
"`process.exit()`"
"lmao i'm dead"
"i can’t drown my pm2 daemons, they know how to swim"
].choose()
.then -> process.exit()
else
return msg.reply "
Halting is a really dangerous command. Calling it will halt the
Haruka proccess, and Haruka may not be restarted automatically.
If you understand what you're actually doing, please run
`-h halt --force` or `-h halt -f`.
"
msg.reply [
"You’re not a Haruka op, so I can’t let you do that."
"You can’t do that, that’s illegal."
"I refuse to let myself be controlled
by the likes of you."
].choose()
module.exports = {
name: "Restart"
regex: /^(halt|restart)(\s+|$)/i
handler: handler
help:
hidden: yes
long: """
```asciidoc
=== Help for Halt ===
*Aliases*: halt, restart
-h halt :: Halts Haruka \
(Must have super-rare™ permissions)
```
"""
}