Удалить ответ и сообщение пользователя setafk через 10 секунд

This commit is contained in:
JonnyBro 2022-01-11 19:59:03 +05:00
parent 1a174a9b11
commit 6762a3d526

View file

@ -33,10 +33,15 @@ class Setafk extends Command {
data.userData.afk = reason;
data.userData.save();
return message.success("general/setafk:SUCCESS", {
const m = await message.success("general/setafk:SUCCESS", {
reason,
prefix: data.guild.prefix
});
setTimeout(() => {
if (m.deletable) m.delete();
if (message.deletable) message.delete();
}, 10 * 1000);
};
}
};