impl basic help command

This commit is contained in:
Lee
2024-06-27 16:01:27 +01:00
parent 175c8eba9f
commit a7c3e2d745
15 changed files with 219 additions and 30 deletions

View File

@ -1,5 +1,6 @@
package cc.fascinated.bat.command.impl;
import cc.fascinated.bat.Consts;
import cc.fascinated.bat.command.BatCommand;
import cc.fascinated.bat.common.EmbedUtils;
import cc.fascinated.bat.model.BatGuild;
@ -15,8 +16,6 @@ import org.springframework.stereotype.Component;
*/
@Component
public class InviteCommand extends BatCommand {
private static final String INVITE_URL = "https://discord.com/oauth2/authorize?client_id=1254161119975833652&permissions=8&integration_type=0&scope=bot+applications.commands";
public InviteCommand() {
super("invite", "Invite the bot to your server!");
}
@ -24,7 +23,7 @@ public class InviteCommand extends BatCommand {
@Override
public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction interaction) {
interaction.replyEmbeds(EmbedUtils.genericEmbed()
.setDescription("You can invite the bot to your server by clicking [here](%s)".formatted(INVITE_URL))
.setDescription("You can invite the bot to your server by clicking [here](%s)".formatted(Consts.INVITE_URL))
.build())
.setEphemeral(true)
.queue();