From c3c6e63ac245f31640dfa2e4ccc4f26a02696f90 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 29 Dec 2021 02:15:26 +0500 Subject: [PATCH] force delete afk --- commands/General/setafk.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/commands/General/setafk.js b/commands/General/setafk.js index a012a227..765c50d6 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -19,6 +19,15 @@ class Setafk extends Command { async run(message, args, data) { const reason = args.join(" "); 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", { reason