File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/de/kittybot/kittybot/commands/utilities Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 66import de .kittybot .kittybot .utils .MessageUtils ;
77import de .kittybot .kittybot .utils .Utils ;
88import net .dv8tion .jda .api .EmbedBuilder ;
9+ import net .dv8tion .jda .api .exceptions .ErrorResponseException ;
910
1011
1112public class AvatarCommand extends ACommand {
@@ -28,10 +29,13 @@ public void run(CommandContext ctx){
2829 if (!Utils .isSnowflake (arg )){
2930 continue ;
3031 }
31- var user = ctx .getJDA ().retrieveUserById (arg ).complete ();
32- if (user != null && !users .contains (user )){
33- users .add (user );
32+ try {
33+ var user = ctx .getJDA ().retrieveUserById (arg ).complete ();
34+ if (!users .contains (user )){
35+ users .add (user );
36+ }
3437 }
38+ catch (ErrorResponseException ignored ){}
3539 }
3640 if (users .isEmpty ()){
3741 users .add (ctx .getUser ());
You can’t perform that action at this time.
0 commit comments