Фикс clear без фильтрации

This commit is contained in:
Jonny_Bro (Nikita) 2023-03-28 10:35:46 +05:00
parent 2782691100
commit 60a7a4f949

View file

@ -117,8 +117,8 @@ class Clear extends BaseCommand {
limit: option, limit: option,
}); });
if ((!member && !user_id) || (member && user_id)) return interaction.replyT("moderation/clear:REQUIRE_ID_USER", null, { edit: true }); if (user_id && member) return interaction.replyT("moderation/clear:REQUIRE_ID_USER", null, { edit: true });
if (member || user_id) messages = messages.filter(m => m.author.id === (member?.id || user_id)); if (user_id || member) messages = messages.filter(m => m.author.id === (user_id || member.id));
interaction.channel.bulkDelete(messages.filter(m => !m.pinned), true); interaction.channel.bulkDelete(messages.filter(m => !m.pinned), true);