File tree Expand file tree Collapse file tree
src/main/java/org/mangorage/mangobot/modules/logs/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ dependencies {
6161 installer(' org.mangorage:installer:4.0.3' )
6262 bot(' org.mangorage:mangobot:11.0.23' )
6363
64+ plugin(' org.mangorage:mangobotgithub:+' )
65+
6466 library(' org.luaj:luaj-jse:3.0.1' )
6567 library(' dev.arbjerg:lavaplayer:2.2.2' )
6668 library(' dev.lavalink.youtube:common:1.11.3' )
Original file line number Diff line number Diff line change 33import net .dv8tion .jda .api .entities .Message ;
44import org .mangorage .mangobot .modules .logs .LogAnalyserModule ;
55
6+ import java .util .regex .Matcher ;
7+ import java .util .regex .Pattern ;
8+
69public final class UUIDChecker implements LogAnalyserModule {
10+ private static final Pattern pattern = Pattern .compile ("--uuid,\\ s*([a-fA-F0-9-]+)" );
11+
12+ public static String extractUUID (String input ) {
13+ Matcher matcher = pattern .matcher (input );
14+
15+ if (matcher .find ()) {
16+ return matcher .group (1 );
17+ } else {
18+ return "UUID not found" ;
19+ }
20+ }
721
822 @ Override
923 public void analyse (String str , Message message ) {
10- System .out .println ("Check" );
24+ var lines = str .split ("\n " );
25+ for (String line : lines ) {
26+ if (line .contains ("--username" ) && line .contains ("--uuid" )) {
27+ message .reply (
28+ "[Found Profile](https://namemc.com/search/%s)" .formatted (extractUUID (line ))
29+ ).setSuppressEmbeds (true ).mentionRepliedUser (true ).queue ();
30+ break ;
31+ }
32+ }
1133 }
1234}
You can’t perform that action at this time.
0 commit comments