mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +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) {
|
async run(message, args, data) {
|
||||||
const reason = args.join(" ");
|
const reason = args.join(" ");
|
||||||
if (!reason || reason.length > 250) return message.error("general/setafk:MISSING_REASON");
|
if (!reason || reason.length > 250) return message.error("general/setafk:MISSING_REASON");
|
||||||
|
|
||||||
if (reason === "delete") {
|
if (reason === "delete") {
|
||||||
if (data.userData.afk) {
|
if (data.userData.afk) {
|
||||||
data.userData.afk = null;
|
data.userData.afk = null;
|
||||||
await data.userData.save();
|
data.userData.save();
|
||||||
|
|
||||||
return message.sendT("general/setafk:DELETED", {
|
return message.sendT("general/setafk:DELETED", {
|
||||||
username: message.author.username
|
username: message.author.username
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
data.userData.afk = reason;
|
||||||
|
data.userData.save();
|
||||||
|
|
||||||
|
return message.success("general/setafk:SUCCESS", {
|
||||||
|
reason,
|
||||||
|
prefix: data.guild.prefix
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
message.success("general/setafk:SUCCESS", {
|
|
||||||
reason,
|
|
||||||
prefix: data.guild.prefix
|
|
||||||
});
|
|
||||||
|
|
||||||
data.userData.afk = reason;
|
|
||||||
data.userData.save();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue