Skip to content

Commit 75f25a3

Browse files
Add the /premium command
1 parent a642d7b commit 75f25a3

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

src/main/java/technobot/commands/CommandRegistry.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public CommandRegistry(TechnoBot bot) {
133133
new RolesCommand(bot),
134134
new PollCommand(bot),
135135
new InviteCommand(bot),
136+
new PremiumCommand(bot),
136137
new HelpCommand(bot) // The 'help' command MUST come last!!!
137138
);
138139
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package technobot.commands.utility;
2+
3+
import net.dv8tion.jda.api.EmbedBuilder;
4+
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
5+
import net.dv8tion.jda.api.interactions.components.buttons.Button;
6+
import technobot.TechnoBot;
7+
import technobot.commands.Category;
8+
import technobot.commands.Command;
9+
import technobot.util.embeds.EmbedColor;
10+
import technobot.util.embeds.EmbedUtils;
11+
12+
/**
13+
* Creates button links to the Patreon to buy premium.
14+
*
15+
* @author TechnoVision
16+
*/
17+
public class PremiumCommand extends Command {
18+
19+
public PremiumCommand(TechnoBot bot) {
20+
super(bot);
21+
this.name = "premium";
22+
this.description = "Provides information on TechnoBot Premium.";
23+
this.category = Category.UTILITY;
24+
}
25+
26+
@Override
27+
public void execute(SlashCommandInteractionEvent event) {
28+
EmbedBuilder embed = new EmbedBuilder()
29+
.setColor(EmbedColor.DEFAULT.color)
30+
.setTitle("TechnoBot Premium")
31+
.setDescription("Premium features are coming soon! But in the meantime, feel free to donate [HERE](https://www.patreon.com/TechnoVision)! ")
32+
.appendDescription("TechnoBot is developed by one guy who pays for server costs out of pocket! I appreciate any support :heart:")
33+
.addField("Premium Features", "⦁ Add up to 10 auto-roles\n⦁ More coming soon...", true);
34+
event.replyEmbeds(embed.build()).addActionRow(Button.link("https://www.patreon.com/TechnoVision", "Buy Premium")).queue();
35+
}
36+
}

0 commit comments

Comments
 (0)