test for null pointer exception
This commit is contained in:
parent
97ceb24a4d
commit
8088e5ffeb
@ -60,6 +60,8 @@ public class UserStatsUtils {
|
||||
|
||||
public List<UserStats> getUserStats(UserEntity userEntity){
|
||||
User jdaUser = MainBot.jda.getUserById(userEntity.getJdaId());
|
||||
logger.debug(userEntity);
|
||||
logger.debug(userEntity.getUserStats());
|
||||
if(userEntity.getUserStats() == null || userEntity.getUserStats().size() == 0 || userEntity.getUserStats().size() < jdaUser.getMutualGuilds().size()){
|
||||
logger.debug("Stats not found for " + userEntity.getName());
|
||||
User user = MainBot.jda.getUserById(userEntity.getJdaId());
|
||||
|
Loading…
Reference in New Issue
Block a user