force delete afk

This commit is contained in:
JonnyBro 2021-12-29 02:15:26 +05:00
parent 2cbbda8f11
commit c3c6e63ac2

View file

@ -19,6 +19,15 @@ class Setafk extends Command {
async run(message, args, data) { async run(message, args, data) {
const reason = args.join(" "); const reason = args.join(" ");
if (!reason) return message.error("general/setafk:MISSING_REASON"); if (!reason) return message.error("general/setafk:MISSING_REASON");
if (reason === "delete") {
if (data.userData.afk) {
data.userData.afk = null;
await data.userData.save();
message.sendT("general/setafk:DELETED", {
username: message.author.username
});
};
};
message.success("general/setafk:SUCCESS", { message.success("general/setafk:SUCCESS", {
reason reason