mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-09-16 07:52:21 +02:00
feat(db): add check extra check when fetching user
This commit is contained in:
parent
319049bc2b
commit
dc523b2db1
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user