mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 22:55:00 +05:00
фикс
This commit is contained in:
parent
175ac0d039
commit
9db7447c88
1 changed files with 11 additions and 9 deletions
|
@ -19,23 +19,25 @@ class Setafk extends Command {
|
|||
async run(message, args, data) {
|
||||
const reason = args.join(" ");
|
||||
if (!reason || reason.length > 250) return message.error("general/setafk:MISSING_REASON");
|
||||
|
||||
if (reason === "delete") {
|
||||
if (data.userData.afk) {
|
||||
data.userData.afk = null;
|
||||
await data.userData.save();
|
||||
data.userData.save();
|
||||
|
||||
return message.sendT("general/setafk:DELETED", {
|
||||
username: message.author.username
|
||||
});
|
||||
};
|
||||
};
|
||||
} else {
|
||||
data.userData.afk = reason;
|
||||
data.userData.save();
|
||||
|
||||
message.success("general/setafk:SUCCESS", {
|
||||
return message.success("general/setafk:SUCCESS", {
|
||||
reason,
|
||||
prefix: data.guild.prefix
|
||||
});
|
||||
|
||||
data.userData.afk = reason;
|
||||
data.userData.save();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue