Add set presence for the bot

This commit is contained in:
SileNce5k 2021-06-22 06:54:59 +02:00
parent 35379aaf49
commit 6bfa3dec46
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

15
commands/setPresence.js Normal file
View file

@ -0,0 +1,15 @@
module.exports = {
name: 'setPresence',
description: 'Set the presence for the bot',
admin: true,
execute({message, client, args}) {
let presenceType = args[0].toLocaleUpperCase();
if(presenceType != "PLAY" || presenceType != "LISTEN" || presenceType != "WATCH") return;
args = args.slice(args[0].length, args.length)
let presenceText = args.join(" ");
client.user.setActivity(presenceText, { type: presenceType });
message.channel.send("Updated presence.")
}
};