Update index.js
Browse files
index.js
CHANGED
|
@@ -28,6 +28,9 @@ socket.on("chat message", (msg) => {
|
|
| 28 |
if (msg.message.startsWith("/whoami")) {
|
| 29 |
socket.emit("chat message", "I am the best bot.")
|
| 30 |
};
|
|
|
|
|
|
|
|
|
|
| 31 |
});
|
| 32 |
socket.on("disconnect", () => {
|
| 33 |
console.log("Disconnected from server");
|
|
|
|
| 28 |
if (msg.message.startsWith("/whoami")) {
|
| 29 |
socket.emit("chat message", "I am the best bot.")
|
| 30 |
};
|
| 31 |
+
if (msg.message.startsWith("/shutdown")) {
|
| 32 |
+
process.exit(666);
|
| 33 |
+
};
|
| 34 |
});
|
| 35 |
socket.on("disconnect", () => {
|
| 36 |
console.log("Disconnected from server");
|