Skip to content

Commit

Permalink
Made Model Command, a user only command
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeyoYT committed Jun 5, 2024
1 parent f478915 commit b34fe24
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/me/ailama/commands/ModelCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import me.ailama.handler.interfaces.AiLamaSlashCommand;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.IntegrationType;
import net.dv8tion.jda.api.interactions.InteractionContextType;
import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions;
import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.dv8tion.jda.api.interactions.commands.build.Commands;
import net.dv8tion.jda.api.interactions.commands.build.SlashCommandData;
Expand All @@ -12,7 +15,13 @@ public class ModelCommand implements AiLamaSlashCommand {
@Override
public SlashCommandData getCommandData() {
return Commands.slash("model","switch model for current session")
.addOption(OptionType.STRING, "model_name", "The model you want to switch to", true);
.setIntegrationTypes(IntegrationType.USER_INSTALL)
.setContexts(InteractionContextType.ALL)
.setDefaultPermissions(DefaultMemberPermissions.ENABLED)

.addOption(OptionType.STRING, "model_name", "The model you want to switch to", true)

.setNSFW(false);
}

@Override
Expand Down

0 comments on commit b34fe24

Please sign in to comment.