From 4c40a0a64b4bc973052597878bf9330e668f4408 Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 9 Sep 2023 15:24:32 +0200 Subject: [PATCH] fix kick "not a member" error --- bot/src/bot/commands/moderation/kick.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/bot/src/bot/commands/moderation/kick.ts b/bot/src/bot/commands/moderation/kick.ts index 8af5ee4..4b25fd7 100644 --- a/bot/src/bot/commands/moderation/kick.ts +++ b/bot/src/bot/commands/moderation/kick.ts @@ -163,17 +163,8 @@ export default { for (const user of targetUsers) { try { - const member = members.find((m) => m.id.user == user.id); - if (!member) { - embeds.push( - embed( - `\`${await fetchUsername( - user.id - )}\` is not a member of this server.` - ) - ); - continue; - } + const member = members.find((m) => m.id.user == user.id) + || await message.serverContext.fetchMember(user.id); let infId = ulid(); let infraction: Infraction = {