fix npe
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m13s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m13s
This commit is contained in:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user