fix npe and maybe fix null users????????
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 39s
This commit is contained in:
@ -3,6 +3,7 @@ package cc.fascinated.bat.model;
|
||||
import cc.fascinated.bat.BatApplication;
|
||||
import cc.fascinated.bat.common.ProfileHolder;
|
||||
import cc.fascinated.bat.common.Serializable;
|
||||
import cc.fascinated.bat.common.UserUtils;
|
||||
import cc.fascinated.bat.features.namehistory.profile.user.NameHistoryProfile;
|
||||
import cc.fascinated.bat.features.scoresaber.profile.user.ScoreSaberProfile;
|
||||
import cc.fascinated.bat.service.DiscordService;
|
||||
@ -59,7 +60,7 @@ public class BatUser extends ProfileHolder {
|
||||
boolean newAccount = this.document.isEmpty();
|
||||
this.createdAt = newAccount ? new Date() : document.getDate("createdAt");
|
||||
|
||||
User user = DiscordService.JDA.getUserById(id);
|
||||
User user = UserUtils.getUser(id);
|
||||
if (user != null) {
|
||||
this.user = user;
|
||||
this.globalName = user.getGlobalName();
|
||||
|
Reference in New Issue
Block a user