Catch JDA exception when there is no internet connection

This commit is contained in:
Lachlan Pond 2023-02-27 21:52:22 +10:00
parent bbed9e8990
commit c4cbfe2a11

View file

@ -200,5 +200,11 @@ public class JMusicBot
+ "invalid: " + ex + "\nConfig Location: " + config.getConfigLocation());
System.exit(1);
}
catch(ErrorResponseException ex)
{
prompt.alert(Prompt.Level.ERROR, "JMusicBot", ex + "\n Invalid reponse returned when "
+ "attempting to connect, please make sure you're connected to the internet");
System.exit(1);
}
}
}