File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
application/src/main/java/org/togetherjava/tjbot/features Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 2121import org .togetherjava .tjbot .features .UserInteractor ;
2222import org .togetherjava .tjbot .features .componentids .ComponentIdGenerator ;
2323import org .togetherjava .tjbot .features .componentids .ComponentIdInteractor ;
24- import org .togetherjava .tjbot .features .utils .LinkDetections ;
24+ import org .togetherjava .tjbot .features .utils .LinkDetection ;
2525import org .togetherjava .tjbot .features .utils .MessageUtils ;
2626
2727import java .time .Instant ;
@@ -122,7 +122,7 @@ private RestAction<Message> createAIResponse(ThreadChannel threadChannel) {
122122
123123 private static boolean isContextSufficient (Message message ) {
124124 return !MessageUtils .containsImage (message )
125- && !LinkDetections .containsLink (message .getContentRaw ());
125+ && !LinkDetection .containsLink (message .getContentRaw ());
126126 }
127127
128128 private RestAction <Void > pinOriginalQuestion (ThreadChannel threadChannel ) {
Original file line number Diff line number Diff line change 1818
1919import org .togetherjava .tjbot .features .CommandVisibility ;
2020import org .togetherjava .tjbot .features .SlashCommandAdapter ;
21- import org .togetherjava .tjbot .features .utils .LinkDetections ;
21+ import org .togetherjava .tjbot .features .utils .LinkDetection ;
2222import org .togetherjava .tjbot .features .utils .LinkPreview ;
2323import org .togetherjava .tjbot .features .utils .LinkPreviews ;
2424import org .togetherjava .tjbot .features .utils .StringDistances ;
@@ -94,10 +94,10 @@ public void onSlashCommand(SlashCommandInteractionEvent event) {
9494 .map (OptionMapping ::getAsUser )
9595 .map (User ::getAsMention );
9696
97- List <String > links = LinkDetections
97+ List <String > links = LinkDetection
9898 .extractLinks (tagContent ,
99- Set .of (LinkDetections .LinkFilter .SUPPRESSED ,
100- LinkDetections .LinkFilter .NON_HTTP_SCHEME ))
99+ Set .of (LinkDetection .LinkFilter .SUPPRESSED ,
100+ LinkDetection .LinkFilter .NON_HTTP_SCHEME ))
101101 .stream ()
102102 .limit (Message .MAX_EMBED_COUNT - 1L )
103103 .toList ();
Original file line number Diff line number Diff line change 1111/**
1212 * Utility class to detect links.
1313 */
14- public class LinkDetections {
14+ public class LinkDetection {
1515
1616 /**
1717 * Possible ways to filter a link.
1818 *
19- * @see LinkDetections
19+ * @see LinkDetection
2020 */
2121 public enum LinkFilter {
2222 /**
@@ -29,7 +29,7 @@ public enum LinkFilter {
2929 NON_HTTP_SCHEME
3030 }
3131
32- private LinkDetections () {
32+ private LinkDetection () {
3333 throw new UnsupportedOperationException ("Utility class" );
3434 }
3535
Original file line number Diff line number Diff line change 2525
2626/**
2727 * Provides means to create previews of links. See
28- * {@link LinkDetections #extractLinks(String, boolean, boolean)} and
28+ * {@link LinkDetection #extractLinks(String, boolean, boolean)} and
2929 * {@link #createLinkPreviews(List)}.
3030 */
3131public final class LinkPreviews {
You can’t perform that action at this time.
0 commit comments