Skip to content

Commit

Permalink
Added default permissions. fix maybe? (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturncorgi authored Sep 17, 2024
1 parent dc03655 commit 841fb8f
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.dv8tion.jda.api.events.session.ReadyEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
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.OptionData;
Expand All @@ -11,17 +12,22 @@ public class InitializeCommands extends ListenerAdapter {
public void onReady(ReadyEvent event) {
event.getJDA().updateCommands().addCommands(
Commands.slash("tba", "Retrieves some information on any team of your choosing.")
.addOption(OptionType.INTEGER, "teamnumber", "Team Number", false),
.addOption(OptionType.INTEGER, "teamnumber", "Team Number", false)
.setDefaultPermissions(DefaultMemberPermissions.ENABLED),
Commands.slash("thebluealliance", "Retrieves some information on any team of your " +
"choosing.")
.addOption(OptionType.INTEGER, "teamnumber", "Team Number", false),
Commands.slash("teaminfo", "Retrieves some information on our team."),
.addOption(OptionType.INTEGER, "teamnumber", "Team Number", false)
.setDefaultPermissions(DefaultMemberPermissions.ENABLED),
Commands.slash("teaminfo", "Retrieves some information on our team.")
.setDefaultPermissions(DefaultMemberPermissions.ENABLED),

// Instructional Commands
Commands.slash("help", "Retrieves a key of all the commands plus how to contribute."),
Commands.slash("resources", "Retrieves an embed with our teams resources."),
Commands.slash("help", "Retrieves a key of all the commands plus how to contribute.").setDefaultPermissions(DefaultMemberPermissions.ENABLED),
Commands.slash("resources", "Retrieves an embed with our teams resources.")
.setDefaultPermissions(DefaultMemberPermissions.ENABLED),
Commands.slash("roster", "Provides instructions on complete ones membership.")
.addOption(OptionType.MENTIONABLE, "notify", "Member to notify", false),
.addOption(OptionType.MENTIONABLE, "notify", "Member to notify", false)
.setDefaultPermissions(DefaultMemberPermissions.ENABLED),
Commands.slash("schedule", "Provides a schedule for the selected department.")
.addOptions(
new OptionData(
Expand All @@ -34,8 +40,10 @@ public void onReady(ReadyEvent event) {
.addChoice("Build Department", "build")
.addChoice("Design/CAD Department", "cad")
.addChoice("Drive Team", "drive")
),
)
.setDefaultPermissions(DefaultMemberPermissions.ENABLED),
Commands.slash("chants", "Retrieves a key of all our chants.")
.setDefaultPermissions(DefaultMemberPermissions.ENABLED)
).queue();
}
}

0 comments on commit 841fb8f

Please sign in to comment.