2
2
3
3
import net .dv8tion .jda .api .events .session .ReadyEvent ;
4
4
import net .dv8tion .jda .api .hooks .ListenerAdapter ;
5
+ import net .dv8tion .jda .api .interactions .commands .DefaultMemberPermissions ;
5
6
import net .dv8tion .jda .api .interactions .commands .OptionType ;
6
7
import net .dv8tion .jda .api .interactions .commands .build .Commands ;
7
8
import net .dv8tion .jda .api .interactions .commands .build .OptionData ;
@@ -11,17 +12,22 @@ public class InitializeCommands extends ListenerAdapter {
11
12
public void onReady (ReadyEvent event ) {
12
13
event .getJDA ().updateCommands ().addCommands (
13
14
Commands .slash ("tba" , "Retrieves some information on any team of your choosing." )
14
- .addOption (OptionType .INTEGER , "teamnumber" , "Team Number" , false ),
15
+ .addOption (OptionType .INTEGER , "teamnumber" , "Team Number" , false )
16
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
15
17
Commands .slash ("thebluealliance" , "Retrieves some information on any team of your " +
16
18
"choosing." )
17
- .addOption (OptionType .INTEGER , "teamnumber" , "Team Number" , false ),
18
- Commands .slash ("teaminfo" , "Retrieves some information on our team." ),
19
+ .addOption (OptionType .INTEGER , "teamnumber" , "Team Number" , false )
20
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
21
+ Commands .slash ("teaminfo" , "Retrieves some information on our team." )
22
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
19
23
20
24
// Instructional Commands
21
- Commands .slash ("help" , "Retrieves a key of all the commands plus how to contribute." ),
22
- Commands .slash ("resources" , "Retrieves an embed with our teams resources." ),
25
+ Commands .slash ("help" , "Retrieves a key of all the commands plus how to contribute." ).setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
26
+ Commands .slash ("resources" , "Retrieves an embed with our teams resources." )
27
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
23
28
Commands .slash ("roster" , "Provides instructions on complete ones membership." )
24
- .addOption (OptionType .MENTIONABLE , "notify" , "Member to notify" , false ),
29
+ .addOption (OptionType .MENTIONABLE , "notify" , "Member to notify" , false )
30
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
25
31
Commands .slash ("schedule" , "Provides a schedule for the selected department." )
26
32
.addOptions (
27
33
new OptionData (
@@ -34,8 +40,10 @@ public void onReady(ReadyEvent event) {
34
40
.addChoice ("Build Department" , "build" )
35
41
.addChoice ("Design/CAD Department" , "cad" )
36
42
.addChoice ("Drive Team" , "drive" )
37
- ),
43
+ )
44
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED ),
38
45
Commands .slash ("chants" , "Retrieves a key of all our chants." )
46
+ .setDefaultPermissions (DefaultMemberPermissions .ENABLED )
39
47
).queue ();
40
48
}
41
49
}
0 commit comments