fix npe
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m13s

This commit is contained in:
Lee 2024-07-05 22:58:32 +01:00
parent 6dc801dda6
commit ccdeebdc1c

@ -79,11 +79,8 @@ public class UserService implements EventListener {
* @return The user
*/
public BatUser getUser(@NonNull String id) {
User user = DiscordService.JDA.getUserById(id);
if (user == null) {
return null;
}
if (user.isBot()) {
User user = DiscordService.JDA.retrieveUserById(id).complete();
if (user == null || user.isBot()) {
return null;
}
return getUser(id, null);