We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9364c6c + e1d6906 commit 9085b7bCopy full SHA for 9085b7b
src/main/java/net/javadiscord/javabot/systems/moderation/AutoMod.java
@@ -202,11 +202,11 @@ public boolean hasSuspiciousLink(Message message) {
202
String url = urlMatcher.group(0).trim();
203
try {
204
URI uri = new URI(url);
205
- if (spamUrls.contains(uri.getHost())) {
+ if (uri.getHost() != null && spamUrls.contains(uri.getHost())) {
206
return true;
207
}
208
} catch (URISyntaxException e) {
209
- e.printStackTrace();
+ log.error("Error while parsing URL: " + url, e);
210
211
212
0 commit comments