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
|
* @return The user
|
||||||
*/
|
*/
|
||||||
public BatUser getUser(@NonNull String id) {
|
public BatUser getUser(@NonNull String id) {
|
||||||
User user = DiscordService.JDA.getUserById(id);
|
User user = DiscordService.JDA.retrieveUserById(id).complete();
|
||||||
if (user == null) {
|
if (user == null || user.isBot()) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (user.isBot()) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return getUser(id, null);
|
return getUser(id, null);
|
||||||
|
Loading…
Reference in New Issue
Block a user