Save presence to config file

This commit is contained in:
SileNce5k 2021-06-27 13:44:10 +02:00
parent 5ecd11ffb7
commit edbf942051
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
2 changed files with 16 additions and 0 deletions

View file

@ -4,6 +4,7 @@ module.exports = {
moreHelp: ["Presence types you can use:","PLAY, LISTEN, WATCH","Presence type have to be the first argument"],
admin: true,
execute({message, client, args}) {
const savePresence = require("../util/savePresence");
let presenceType = args[0].toLocaleUpperCase();
if(presenceType == "PLAY" || presenceType == "LISTEN" || presenceType == "WATCH"){
@ -21,6 +22,7 @@ module.exports = {
let temp = args.join(" ");
let presenceText = temp.slice(firstArg, temp.length)
client.user.setActivity(presenceText, { type: presenceType });
savePresence(presenceType, presenceText);
message.channel.send("Updated presence.")
}else return;