Skip to content

Commit 3a4d007

Browse files
committed
Enabled & Added Hex & Gradient Choice
1 parent 0892357 commit 3a4d007

File tree

1 file changed

+80
-84
lines changed

1 file changed

+80
-84
lines changed
Lines changed: 80 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,80 @@
1-
//package me.TechsCode.TechDiscordBot.module.cmds;
2-
//
3-
//import me.TechsCode.TechDiscordBot.TechDiscordBot;
4-
//import me.TechsCode.TechDiscordBot.module.CommandModule;
5-
//import me.TechsCode.TechDiscordBot.util.TechEmbedBuilder;
6-
//import net.dv8tion.jda.api.entities.Member;
7-
//import net.dv8tion.jda.api.entities.TextChannel;
8-
//import net.dv8tion.jda.api.events.interaction.SlashCommandEvent;
9-
//import net.dv8tion.jda.api.interactions.commands.OptionType;
10-
//import net.dv8tion.jda.api.interactions.commands.build.OptionData;
11-
//import net.dv8tion.jda.api.interactions.commands.privileges.CommandPrivilege;
12-
//
13-
//public class HowtoCommand extends CommandModule {
14-
//
15-
// public HowtoCommand(TechDiscordBot bot) {
16-
// super(bot);
17-
// }
18-
//
19-
// @Override
20-
// public String getName() {
21-
// return "howto";
22-
// }
23-
//
24-
// @Override
25-
// public String getDescription() {
26-
// return "Howto about popular topics.";
27-
// }
28-
//
29-
// @Override
30-
// public CommandPrivilege[] getCommandPrivileges() {
31-
// return new CommandPrivilege[0];
32-
// }
33-
//
34-
// @Override
35-
// public OptionData[] getOptions() {
36-
// return new OptionData[] {
37-
// new OptionData(OptionType.STRING, "topic", "Select Topic.", true)
38-
// .addChoice("MySQL", "MySQL"),
39-
//
40-
// };
41-
// }
42-
//
43-
// @Override
44-
// public int getCooldown() {
45-
// return 5;
46-
// }
47-
//
48-
// @Override
49-
// public void onCommand(TextChannel channel, Member m, SlashCommandEvent e) {
50-
// String topic = e.getOption("topic").getAsString();
51-
//
52-
// if(topic.equalsIgnoreCase("MySQL")) {
53-
// e.replyEmbeds(
54-
// new TechEmbedBuilder("How To Setup MySQL")
55-
// .success()
56-
// .text("To connect your server to MySQL, open the GUI of the desired plugin and\n" +
57-
// "click on, Settings >> MySQL Database >> Setup MySQL >> Credentials```\n" +
58-
// "\n" +
59-
// "Here you will need to fill in the credentials of your database.\n" +
60-
// "\n" +
61-
// "Once you have filled in all the credentials, you can now test the connection and save it.\n" +
62-
// "\n" +
63-
// "When you have saved your credentials, you need to restart your server for the plugin to connect.\n" +
64-
// "\n" +
65-
// "When you have repeated this process for all of your servers, your plugin is now proxy-ready.\n" +
66-
// "\n" +
67-
// "**NOTE: If your database has not connected or the test takes too long, you have entered the wrong credentials.**")
68-
// //.field("EXAMPLE FIELD", "EXAMPLE FIELD CONTENT", true)
69-
// .build()
70-
// ).queue();
71-
// }
72-
// }
73-
//}
74-
//// Example
75-
//// if(topic.equalsIgnoreCase("Test")) {
76-
//// e.replyEmbeds(
77-
//// new TechEmbedBuilder("EXAMPLE TITLE")
78-
//// .success()
79-
//// .text("EXAMPLE TEXT")
80-
//// .field("EXAMPLE FIELD", "EXAMPLE FIELD CONTENT", true)
81-
//// .build()
82-
//// ).queue();
83-
//// }
84-
//
1+
package me.TechsCode.TechDiscordBot.module.cmds;
2+
3+
import me.TechsCode.TechDiscordBot.TechDiscordBot;
4+
import me.TechsCode.TechDiscordBot.module.CommandModule;
5+
import me.TechsCode.TechDiscordBot.util.TechEmbedBuilder;
6+
import net.dv8tion.jda.api.entities.Member;
7+
import net.dv8tion.jda.api.entities.TextChannel;
8+
import net.dv8tion.jda.api.events.interaction.SlashCommandEvent;
9+
import net.dv8tion.jda.api.interactions.commands.OptionType;
10+
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
11+
import net.dv8tion.jda.api.interactions.commands.privileges.CommandPrivilege;
12+
13+
public class HowtoCommand extends CommandModule {
14+
15+
public HowtoCommand(TechDiscordBot bot) {
16+
super(bot);
17+
}
18+
19+
@Override
20+
public String getName() {
21+
return "howto";
22+
}
23+
24+
@Override
25+
public String getDescription() {
26+
return "Howto about popular topics.";
27+
}
28+
29+
@Override
30+
public CommandPrivilege[] getCommandPrivileges() {
31+
return new CommandPrivilege[0];
32+
}
33+
34+
@Override
35+
public OptionData[] getOptions() {
36+
return new OptionData[] {
37+
new OptionData(OptionType.STRING, "topic", "Select Topic.", true)
38+
.addChoice("Hex & Gradient", "Hex & Gradient"),
39+
40+
};
41+
}
42+
43+
@Override
44+
public int getCooldown() {
45+
return 5;
46+
}
47+
48+
@Override
49+
public void onCommand(TextChannel channel, Member m, SlashCommandEvent e) {
50+
String topic = e.getOption("topic").getAsString();
51+
52+
if(topic.equalsIgnoreCase("Hex & Gradient")) {
53+
e.replyEmbeds(
54+
new TechEmbedBuilder("How To Use Hex & Gradient")
55+
.success()
56+
.text("In order to use **Hex** and **Gradients** in Ultra and Insane plugins, you will have to use two different formats.\n" +
57+
"\n" +
58+
"__For Hex Colors__ >\n" +
59+
"```\n" +
60+
"{#RRGGBB}Some Text{#RRGGBB}```\n" +
61+
"__For Gradients Colors__ >\n" +
62+
"```{#RRGGBB>}Some Text{#RRGGBB<}```\n" +
63+
"To be able to create gradient colors in an easier way and having a preview of them you can use this [site](https://rgb.fedee.tk/), you have to select as `Type` **Techscode {#rrggbb>}** then write the text you want to use in `Message`, after modify the colors and finally copy the text where it will be written `Output`.")
64+
//.field("EXAMPLE FIELD", "EXAMPLE FIELD CONTENT", true)
65+
.build()
66+
).queue();
67+
}
68+
}
69+
}
70+
// Example
71+
// if(topic.equalsIgnoreCase("Test")) {
72+
// e.replyEmbeds(
73+
// new TechEmbedBuilder("EXAMPLE TITLE")
74+
// .success()
75+
// .text("EXAMPLE TEXT")
76+
// .field("EXAMPLE FIELD", "EXAMPLE FIELD CONTENT", true)
77+
// .build()
78+
// ).queue();
79+
// }
80+

0 commit comments

Comments
 (0)