Refactor command packages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-20 18:56:57 +01:00
parent 3474593dc9
commit 913e8e023a
10 changed files with 44 additions and 31 deletions

View File

@@ -0,0 +1,23 @@
package wtf.beatrice.hidekobot.commands.slash;
import net.dv8tion.jda.api.entities.channel.ChannelType;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.Configuration;
public class InviteCommand
{
public InviteCommand(@NotNull SlashCommandInteractionEvent event)
{
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();
}
}