Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
transgirllucy committed Mar 31, 2022
1 parent 2fac975 commit 78aa0b2
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/commands/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/commands/Userinfo.java
Original file line number Diff line number Diff line change
@@ -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()));
}
}
}

33 changes: 25 additions & 8 deletions src/main/java/configurations/Configuration.java
Original file line number Diff line number Diff line change
@@ -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() {

}
Expand Down Expand Up @@ -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;
}
}
Binary file modified target/classes/Main.class
Binary file not shown.
Binary file modified target/classes/commands/Help.class
Binary file not shown.
Binary file added target/classes/commands/Userinfo.class
Binary file not shown.
Binary file modified target/classes/configurations/Configuration.class
Binary file not shown.

0 comments on commit 78aa0b2

Please sign in to comment.