2022-11-20 18:56:57 +01:00
|
|
|
package wtf.beatrice.hidekobot.commands.slash;
|
2022-11-20 16:07:04 +01:00
|
|
|
|
2022-11-20 16:20:50 +01:00
|
|
|
import net.dv8tion.jda.api.entities.channel.ChannelType;
|
2022-11-20 16:07:04 +01:00
|
|
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
2022-11-20 16:20:50 +01:00
|
|
|
import net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction;
|
2022-11-20 16:07:04 +01:00
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import wtf.beatrice.hidekobot.Configuration;
|
|
|
|
|
|
|
|
public class InviteCommand
|
|
|
|
{
|
|
|
|
public InviteCommand(@NotNull SlashCommandInteractionEvent event)
|
|
|
|
{
|
2022-11-20 16:20:50 +01:00
|
|
|
ReplyCallbackAction reply = event.reply("Here's your link ✨ " + Configuration.getInviteUrl());
|
|
|
|
|
|
|
|
// only make message permanent in DMs
|
|
|
|
if(!(event.getChannelType() == ChannelType.PRIVATE))
|
|
|
|
{
|
|
|
|
reply = reply.setEphemeral(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
reply.queue();
|
2022-11-20 16:07:04 +01:00
|
|
|
}
|
|
|
|
}
|