feat(db): add check extra check when fetching user

This commit is contained in:
smyalygames 2023-02-16 16:36:33 +00:00
parent 319049bc2b
commit dc523b2db1

View File

@ -135,7 +135,11 @@ export class UnbanCommand extends Command {
let user = guild.client.users.cache.get(userId);
if (user === undefined) {
user = await guild.client.users.fetch(userId) as User;
user = await guild.client.users.fetch(userId);
if (user === undefined) {
info.message = 'Could not fetch the user!';
return info;
}
}
if (!await checkBan(userId)) {