fix kick "not a member" error

This commit is contained in:
Lea 2023-09-09 15:24:32 +02:00
parent 774a418b15
commit 4c40a0a64b
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

View file

@ -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 = {