diff --git a/src/plugins/ModActions.ts b/src/plugins/ModActions.ts index 083f6cff..96f10593 100644 --- a/src/plugins/ModActions.ts +++ b/src/plugins/ModActions.ts @@ -187,11 +187,15 @@ export class ModActionsPlugin extends ZeppelinPlugin { userId = userResolvable; } - return ( - this.bot.users.find(u => u.id === userId) || - (await this.bot.getRESTUser(userId)) || - createUnknownUser({ id: userId }) - ); + const cachedUser = this.bot.users.find(u => u.id === userId); + if (cachedUser) return cachedUser; + + try { + const freshUser = await this.bot.getRESTUser(userId); + return freshUser; + } catch (e) {} // tslint:disable-line + + return createUnknownUser({ id: userId }); } async getMember(userId: string): Promise {