All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 37s
33 lines
1.3 KiB
Java
33 lines
1.3 KiB
Java
package cc.fascinated.bat.command.impl;
|
|
|
|
import cc.fascinated.bat.command.BatCommand;
|
|
import cc.fascinated.bat.common.EmbedUtils;
|
|
import cc.fascinated.bat.model.BatGuild;
|
|
import cc.fascinated.bat.model.BatUser;
|
|
import lombok.NonNull;
|
|
import net.dv8tion.jda.api.entities.Member;
|
|
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
|
|
import net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/**
|
|
* @author Fascinated (fascinated7)
|
|
*/
|
|
@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!");
|
|
}
|
|
|
|
@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))
|
|
.build())
|
|
.setEphemeral(true)
|
|
.queue();
|
|
}
|
|
}
|