From 78aa0b234e41c335662b9dc6808775a09168f72a Mon Sep 17 00:00:00 2001 From: tuxa <69870860+mrtuxa@users.noreply.github.com> Date: Thu, 31 Mar 2022 16:20:34 +0200 Subject: [PATCH] update --- src/main/java/Main.java | 1 + src/main/java/commands/Help.java | 2 +- src/main/java/commands/Userinfo.java | 26 ++++++++++++++ .../java/configurations/Configuration.java | 33 +++++++++++++----- target/classes/Main.class | Bin 1463 -> 1505 bytes target/classes/commands/Help.class | Bin 3660 -> 4912 bytes target/classes/commands/Userinfo.class | Bin 0 -> 2737 bytes .../configurations/Configuration.class | Bin 3512 -> 3433 bytes 8 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 src/main/java/commands/Userinfo.java create mode 100644 target/classes/commands/Userinfo.class diff --git a/src/main/java/Main.java b/src/main/java/Main.java index a2dbef6..d952f66 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -17,6 +17,7 @@ public static void main(String[] args) { .addListener(new Ping()) .addListener(new Say()) .addListener(new ServerInfo()) + .addListener(new Userinfo()) .login() .join(); // activity set image diff --git a/src/main/java/commands/Help.java b/src/main/java/commands/Help.java index 02078fc..1715bc3 100644 --- a/src/main/java/commands/Help.java +++ b/src/main/java/commands/Help.java @@ -22,7 +22,7 @@ public void onMessageCreate(MessageCreateEvent event) { .addField("\uD83D\uDCDA","`" + configuration.getPrefix() + "kick` - Kicks a user\n",true ) // implement yet (not working) .addField("\uD83D\uDCDA", "`" + configuration.getPrefix() + "ban` - Bans a user\n", true) // not implemented yet .addField("\uD83D\uDCDA","`" + configuration.getPrefix() + "purge` - Purges a number of messages\n", true) // implemented yet (not working) - .addField("\uD83D\uDCDA","`" + configuration.getPrefix() + "serverinfo` - Shows information about the server\n", true) + .addField("\uD83D\uDCDA","`" + configuration.getPrefix() + "serverinfo` - Shows information about the server\n", true) // implemented yet .addField("\uD83D\uDCDA", "`" + configuration.getPrefix() + "userinfo` - Shows information about the user\n", true) .addField("\uD83D\uDCDA","`" + configuration.getPrefix() + "avatar` - Shows the avatar of the user\n", true) .addField("\uD83D\uDCDA","`" + configuration.getPrefix() + "servericon` - Shows the icon of the server\n", true) diff --git a/src/main/java/commands/Userinfo.java b/src/main/java/commands/Userinfo.java new file mode 100644 index 0000000..d7aaaf7 --- /dev/null +++ b/src/main/java/commands/Userinfo.java @@ -0,0 +1,26 @@ +package commands; + +import javafx.scene.paint.Color; +import org.javacord.api.entity.message.embed.EmbedBuilder; +import org.javacord.api.event.message.MessageCreateEvent; +import org.javacord.api.listener.message.MessageCreateListener; + + +public class Userinfo implements MessageCreateListener { + configurations.Configuration configuration = new configurations.Configuration(); + + public void onMessageCreate(MessageCreateEvent event) { + if (event.getMessage().getContent().equalsIgnoreCase(configuration.getPrefix() + "userinfo")) { + event.getChannel().sendMessage(new EmbedBuilder() + .setTitle("Userinfo") + .setDescription("This command will show you your userinfo") + .setThumbnail(event.getMessageAuthor().getAvatar()) + .setAuthor(event.getMessageAuthor().getName(), null, event.getMessageAuthor().getAvatar()) + .addField("Name", event.getMessageAuthor().getName(), true) + .addField("ID", event.getMessageAuthor().getIdAsString(), true) + .addField("Joined", event.getMessageAuthor().getCreationTimestamp().toString(), true) + .setFooter("Requested by " + event.getMessageAuthor().getName(), event.getMessageAuthor().getAvatar())); + } + } +} + diff --git a/src/main/java/configurations/Configuration.java b/src/main/java/configurations/Configuration.java index 51bda23..3886438 100644 --- a/src/main/java/configurations/Configuration.java +++ b/src/main/java/configurations/Configuration.java @@ -1,17 +1,19 @@ package configurations; public class Configuration { - private String token = "" ; //token + private String token = "OTU3MDM4NzMzOTM1Mzc4NTAz.Yj49xw.4HYoYz0HcA_RqWAe1JMQW25Vlgk" ; //token private String prefix = ">" ; // Prefix for commands - private String guild = ""; // Guild ID - private String welcomeChannel = ""; // Welcome channel ID + private String guild = "947468849505263616"; // Guild ID + private String welcomeChannel = "947468849505263619"; // Welcome channel ID private String youtube_api_key = ""; // YouTube API key - private String footerText = ""; // Footer text - private String footerIcon = ""; // Footer icon + private String footerText = "VictoriaState"; // Footer text + private String footerIcon = "https://cdn.discordapp.com/attachments/956593618221695028/957042576035311736/VictoriaState.png"; // Footer icon private String EmbedColor = "3c0fdb"; // Embed color - private String avatarUrl = ""; // Avatar URL - private String botName = ""; // Bot name - private String GuildName = ""; // Guild name + private String avatarUrl = "https://cdn.discordapp.com/attachments/956593618221695028/957042576035311736/VictoriaState.png"; // Avatar URL + private String botName = "VictoriaState"; // Bot name + private String GuildName = "VictoriaState"; // Guild name + private String activityName = ">help to getting started"; // Activity name + private String activityUrl = "https://www.youtube.com/watch?v=Z_JU4NE90gI"; // Activity URL public Configuration() { } @@ -98,4 +100,19 @@ public String getGuildName() { return GuildName; } + public String setActivityName() { + return activityName; + } + + public String getActivityName() { + return activityName; + } + + public String setActivityUrl() { + return activityUrl; + } + + public String getactivityUrl() { + return activityUrl; + } } diff --git a/target/classes/Main.class b/target/classes/Main.class index 2bfd5d11511020ed37fc7010e8a60b6935e6b3f1..30538978bb015078ba578a05ae2af022375b05be 100644 GIT binary patch delta 462 zcmYL^+ip@(5Qe|C0rzI@O$?BD z2e-7BH@PjbG~=aUG9$5dSy2+uct>(p<6TKm<2^}eRD56ZfQKfJ{5pPOHs0+!RC((D66KU2c$!%|Xmp$H-HyXE zo}0XIsPR$|cLzp1YO>_;ie-US>2wd<&BKPn3a>wJ8hN80SC{H%AW*}Vy{Mv`LZQ%? z?jt@9)04`c8IpdI%6CQuTw+Q^eo|akjBfskM}2tf{_$2b-w18=8Sf!`gnLYUCsNCN zB06^N3o#G>#ft>obzicy#JE~7%o-EaiLys*IB;?#$`!6Eaf>akab1n9t5woW4=>25 HjKPh600=;9 delta 411 zcmXAk$xZ@66h%)rU_;Ty2~b2Fa8{gfR>TPr#gTxF*?YRyV|qhSZl#Wn)YBqs*!pk=##`mAN_OC(O;*$9F52m^XAwG;R`O3A z^1_kjait^AG(6+`z`q@RBv9Y@N|S>J`K+TXW0+Ri)v=hyM@H_OrIAB|c0_x{hAz6L W(#-)q^vaN|4DX}g{^Ee`H24qUEj7jf diff --git a/target/classes/commands/Help.class b/target/classes/commands/Help.class index f60436a7c8c0e08d2e44cb0f3c830e37e6d0127a..5a5b0fe133a0620ef486c4f0a3a270a7540e60f1 100644 GIT binary patch delta 1892 zcmZuxYj6`)6#nk+wtJJ^0Hau`v~)vxwIS5nYD*hhwN+F^O9~dSYD2nhB1yJQ(jtlk z6yJc>^;HzDiVBLA(i$uXK4)|s#__*Do$;5<$c(>m#_`_GrfpVdl6%j0?)RN@_UyTP zvFy}}%uoNEy#Syd-??!!f-*YY5D;{s6`K`o!F@8i+$ctnySH*{8^w0M-|t2@9^jk@ zWjy4@JOn9vI1VY;fv|#J=-l1Mmwt)}-=h={Q|zROaTL!`Bq$7u0g6G2Bt?oMO)*3< zOtFjN5sKXuk5W8Fv4`SuioFy}wU1&y#S;`yQXHUoisEUCXL$B!6+DOMdATp}6bD^6 zgu~o=k^5fa)`)_aVaj+#F2buaUYq#6nH0Cnh&BsM#Tud5>UJ z#hZAGK#J(G0To9vD&uVx?_f;DyLit$B(yZYk7F`EQ1Kx?l5t$c34E;L6P#4>DaHv( zHbF~?JI8So_>)FVH|I;sGTdMeAK$}9%t&%| zTO^d|*K>NynGayIEBMZd>!ZVr7ScG@(gw4JSPmAiDyhc}R*%gKT4;vZmo(xzZh({h ziD-CdA{4hm&dr_o=hNH4>%y$QgdVdVz_wYK8r%HeNGy6j%B-T+Hq*vHH0*qE%lThT zgRL1bQqgqOP^@;hSq(D}N?OKepKIZy9!l$4fS1!^1-Bf$2{wiIJ)A323n)N z7Q5YY6te5{Y~EX&s|8xaEKk3YjPf)YzqXMb7V6gKbtyfq@p_nOrmRjqoqN;Pfjud+ z6*kY+T0IH0TANknj5yyd)fzNgV}_&+?Vg}MIHaf2dat%)x2EDWCS^>i_?%yzEMLyx z3mMZY&f=VkFL7SQ1@8U|<1)Th@eRJ6Y$}=(&2HCGvfUh^%guGPaq^0*iIlgpZxg{S z><@l7*(xxb-B`BXZf;V%4eObY-*3PLiCK3rOSSk5a3}6!h+qTm=6pc<6-AsYEi_Lk zm4bNL{8<^4q%0Pjm(@~bNfxdwlo?!6h|RsKJWKW#9x6*6xUv9iGeXnvnT=w0%mK>E z0!gW|%7LpKxY~hz4!qid{SLgwfomN2dIzp`;2Rvct`KjjpT*};yzLC+t8Qd2-!yI_ zm_`F(^T8WlJq6bD#w^yJMpG8eIULAh-85PRbWO0gD1yJ~!>BZW@RVmx;u`#d68wd0 z$s#Nw0hE#+Tt^OIF*%MhauMa^Pb?7@qC#kdCUnCq?88#w7%GJyu}t^_%f$s)A=YE1 zxD~6!J*X1LP%VBBpZFVAOMqXJu}1P>zH~Ket*I)>O%9(bFDr!&5jNr;HdyyEPz3Tf LV-j>QAYjwKm%!t= delta 1056 zcmYk4+jA5}6vlr&n`C-tI=jh=!3a_lVz2~5G@?O+QM?dP1SAL&FR)~1v#XogB)bt% zan*Ri3n+}27^6ulOoLIE0!8yjV}^b*%6<+QbkJ~58T7QvGaRyc)~00hoS=RnAEdK`W24Dp zHXjIhH^@QYqhNbmR76-USXj&w3t@Ow;YpI0G{!5yqOdR;tAtE>*hr+pvam7kEzHf~mbm>N zc3LV#E4Wojv$OnSI(tdQpO;j$U6eG&o7IZ{)5JC5+1TPRXs}BauKkI+-9KO_R_gUt zbF31~ah;&5UU{0D3hfnEe@{n+>#O+<6*}j*(PGzk`dAUn(RXsWjxpMZYnvMMb8loT z2~u3fVHR;pum3?4=U6NjafRrjS@idDr8vYAF{9i5s=NM8ySTt=tCkMSC2lp+Iqzdr d)vE;`wQJnTUE0aJb<0}Bc`X#&qZ5k_{{k+}*rfmf diff --git a/target/classes/commands/Userinfo.class b/target/classes/commands/Userinfo.class new file mode 100644 index 0000000000000000000000000000000000000000..0b29784b5bc73dfb6bfe2a8f8202bea466ee5bab GIT binary patch literal 2737 zcmbtWTXWk)6#mw^$g!0saV{-TiVKuF390CXhLR9SoP@eKX=vP(rch9q|KGEO948vJVO6swbblL~)N0h7NxKd$935+C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target/classes/configurations/Configuration.class index a556c580f90f2fdd0ee4829b9514bda367522743..bc16c807e0c912c262d19c1569a8770b85548570 100644 GIT binary patch delta 154 zcmWl~I}*WQ7>3a&F`56P)cI{gYX|Oe7k8mBL!-|cEXAZT3Wd@>6gFYZ+njT+etq`- zJ)S^~LkUmQXcei@Hafa%^mJ_W^}rbFkula2W2$FHqUT~EmSSbB^~Tuhog;PZ1ES0M Yn4SX4x9k<>aiJatKEFmE7ePql5850Vod5s; delta 187 zcmaDUwL`l8)W2Q(7#J8#7&5pRq!|1-82mXIBpCuY7y?0b5C=mrhz{Xk2nEq$91P(g zI)Z~C5=2LFFhqms7!HP55FH01;z2|Lh)CpMNCMHx91JNSI+dLvjh!K#k%6@&KRY## zkwIu<{UIg+{^Hb<#N?99vdof7zr@_s&GyXpOpMZ->sg<&PyWO%GP#9Ekg;O&LJm=O KAD~;A7<>UklqA~#