Skip to content

Commit 8cc7bfa

Browse files
committed
Ignore errors from perspective where language is not supported
1 parent 66650de commit 8cc7bfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bot/src/main/java/ml/duncte123/skybot/utils/PerspectiveApi.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public static float checkSwearFilter(String text, String channelId, String apiKe
5252
return 0f;
5353
}
5454

55+
if (error.contains("does not support request languages")) {
56+
return 0f;
57+
}
58+
5559
throw new HttpException("Error while handling perspective api request: " + json);
5660
}
5761

0 commit comments

Comments
 (0)