aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-19 14:08:42 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-19 14:08:42 -0400
commit69858d1a95d66fff96da6cf0d3b25bf25813d321 (patch)
treefeec458e9f7fc8fdf5584a3b52ba90e3da2db078
parentd211d73230e7977e30736c21a119e6f696397d43 (diff)
downloadDLAP-69858d1a95d66fff96da6cf0d3b25bf25813d321.tar.gz
DLAP-69858d1a95d66fff96da6cf0d3b25bf25813d321.tar.bz2
DLAP-69858d1a95d66fff96da6cf0d3b25bf25813d321.zip
Set status to invis, removed ms ping, changed name to stop
-rw-r--r--bot.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/bot.js b/bot.js
index 6db2ded..c9e9390 100644
--- a/bot.js
+++ b/bot.js
@@ -19,6 +19,7 @@ function playAudio() {
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
console.log(`Prefix: ${prefix}`);
+ client.user.setStatus("invisible");
playAudio();
});
@@ -32,13 +33,14 @@ client.on('message', async msg => {
command = command.slice(prefix.length);
if (command == 'ping') {
- msg.reply('Pong! ' + Math.round(client.ping) + ' ms');
+ msg.reply('Pong!');
}
- if (command == 'poweroff') {
- console.log("Powering off...");
- client.destroy();
- process.exit(0);
+ if (command == 'stop') {
+ await msg.reply("Powering off...")
+ console.log("Powering off...");
+ client.destroy();
+ process.exit(0);
}
if (command == 'join') {