@@ -14,7 +14,14 @@ const serverCommands: Array<RESTPostAPIChatInputApplicationCommandsJSONBody> = [
14
14
new SlashCommandBuilder ( ) . setName ( "flag" ) . setDescription ( "Check flag!" )
15
15
. addStringOption ( option => option . setName ( 'flag' ) . setDescription ( "Check your flag" ) . setRequired ( true ) ) ,
16
16
new SlashCommandBuilder ( ) . setName ( "listchall" ) . setDescription ( "View all challenge (Normal or admin)" )
17
- . addStringOption ( option => option . setName ( "category" ) . setDescription ( "Type category" ) )
17
+ . addStringOption ( option => option . setName ( "category" ) . addChoices (
18
+ { name : 'Binary Exploitation' , value : 'Binary Exploitation' } as APIApplicationCommandOptionChoice < string > ,
19
+ { name : 'Cryptography' , value : 'Cryptography' } as APIApplicationCommandOptionChoice < string > ,
20
+ { name : 'Forensics' , value : 'Forensics' } as APIApplicationCommandOptionChoice < string > ,
21
+ { name : 'Miscellaneous' , value : 'Miscellaneous' } as APIApplicationCommandOptionChoice < string > ,
22
+ { name : 'Reverse Engineering' , value : 'Reverse Engineering' } as APIApplicationCommandOptionChoice < string > ,
23
+ { name : 'Web Exploitation' , value : 'Web Exploitation' } as APIApplicationCommandOptionChoice < string > ,
24
+ ) . setDescription ( "Type category" ) )
18
25
. addStringOption ( option => option . setName ( "password" ) . setDescription ( "Type password to verify" ) ) ,
19
26
new SlashCommandBuilder ( ) . setName ( "challenge" ) . setDescription ( "Add new flag!" )
20
27
. addStringOption ( option => option . setName ( 'id' ) . setDescription ( "Add new flag!" ) . setRequired ( true ) )
@@ -25,8 +32,16 @@ const serverCommands: Array<RESTPostAPIChatInputApplicationCommandsJSONBody> = [
25
32
. addStringOption ( option => option . setName ( 'flag' ) . setDescription ( "Add new flag!" ) . setRequired ( true ) )
26
33
. addBooleanOption ( option => option . setName ( 'public' ) . setDescription ( "Add new flag!" ) . setRequired ( true ) )
27
34
. addNumberOption ( option => option . setName ( 'point' ) . setDescription ( "Add new flag!" ) . setRequired ( true ) )
28
- . addStringOption ( option => option . setName ( 'category' ) . setDescription ( "Add category" ) . setRequired ( true ) )
35
+ . addStringOption ( option => option . setName ( 'category' ) . setDescription ( "Add category" ) . addChoices (
36
+ { name : 'Binary Exploitation' , value : 'Binary Exploitation' } as APIApplicationCommandOptionChoice < string > ,
37
+ { name : 'Cryptography' , value : 'Cryptography' } as APIApplicationCommandOptionChoice < string > ,
38
+ { name : 'Forensics' , value : 'Forensics' } as APIApplicationCommandOptionChoice < string > ,
39
+ { name : 'Miscellaneous' , value : 'Miscellaneous' } as APIApplicationCommandOptionChoice < string > ,
40
+ { name : 'Reverse Engineering' , value : 'Reverse Engineering' } as APIApplicationCommandOptionChoice < string > ,
41
+ { name : 'Web Exploitation' , value : 'Web Exploitation' } as APIApplicationCommandOptionChoice < string > ,
42
+ ) . setRequired ( true ) )
29
43
. addStringOption ( option => option . setName ( 'url' ) . setDescription ( "Add category" ) . setRequired ( true ) )
44
+ . addStringOption ( option => option . setName ( 'idcontest' ) . setDescription ( "Contest Challenge (No if not)" ) . setRequired ( true ) )
30
45
. addStringOption ( option => option . setName ( 'password' ) . setDescription ( "Admin password" ) . setRequired ( true ) ) ,
31
46
new SlashCommandBuilder ( ) . setName ( "rmchall" ) . setDescription ( "Admin delete challenge" )
32
47
. addStringOption ( option => option . setName ( "id" ) . setDescription ( "Id challenge" ) . setRequired ( true ) )
@@ -35,7 +50,37 @@ const serverCommands: Array<RESTPostAPIChatInputApplicationCommandsJSONBody> = [
35
50
. addStringOption ( option => option . setName ( "id" ) . setDescription ( "ID challenge" ) . setRequired ( true ) )
36
51
. addStringOption ( option => option . setName ( "url" ) . setDescription ( "Url challenge" ) . setRequired ( true ) )
37
52
. addBooleanOption ( option => option . setName ( "status" ) . setDescription ( "Status challenge" ) . setRequired ( true ) )
53
+ . addStringOption ( option => option . setName ( "password" ) . setDescription ( "Admin password" ) . setRequired ( true ) ) ,
54
+ new SlashCommandBuilder ( ) . setName ( "createcontest" ) . setDescription ( "Admin create contest" )
38
55
. addStringOption ( option => option . setName ( "password" ) . setDescription ( "Admin password" ) . setRequired ( true ) )
56
+ . addStringOption ( option => option . setName ( "name" ) . setDescription ( "Contest name" ) . setRequired ( true ) )
57
+ . addStringOption ( option => option . setName ( "description" ) . setDescription ( "Contest description" ) . setRequired ( true ) )
58
+ . addStringOption ( option => option . setName ( "start" ) . setDescription ( "Contest start time" ) . setRequired ( true ) )
59
+ . addStringOption ( option => option . setName ( "endt" ) . setDescription ( "Contest end time" ) . setRequired ( true ) )
60
+ . addBooleanOption ( option => option . setName ( "status" ) . setDescription ( "Contest status" ) . setRequired ( true ) ) ,
61
+ new SlashCommandBuilder ( ) . setName ( "listcontest" ) . setDescription ( "View all contest (Normal or admin)" )
62
+ . addStringOption ( option => option . setName ( "password" ) . setDescription ( "Type password to verify" ) ) ,
63
+ new SlashCommandBuilder ( ) . setName ( "rmcontest" ) . setDescription ( "Admin delete contest" )
64
+ . addStringOption ( option => option . setName ( "id" ) . setDescription ( "Id contest" ) . setRequired ( true ) )
65
+ . addStringOption ( option => option . setName ( "password" ) . setDescription ( "Admin password" ) . setRequired ( true ) ) ,
66
+ new SlashCommandBuilder ( ) . setName ( "updatecontest" ) . setDescription ( "Admin update contest" )
67
+ . addStringOption ( option => option . setName ( "id" ) . setDescription ( "ID contest" ) . setRequired ( true ) )
68
+ . addStringOption ( option => option . setName ( "name" ) . setDescription ( "Contest name" ) . setRequired ( true ) )
69
+ . addStringOption ( option => option . setName ( "description" ) . setDescription ( "Contest description" ) . setRequired ( true ) )
70
+ . addStringOption ( option => option . setName ( "start" ) . setDescription ( "Contest start time" ) . setRequired ( true ) )
71
+ . addStringOption ( option => option . setName ( "endt" ) . setDescription ( "Contest end time" ) . setRequired ( true ) )
72
+ . addBooleanOption ( option => option . setName ( "status" ) . setDescription ( "Contest status" ) . setRequired ( true ) )
73
+ . addStringOption ( option => option . setName ( "password" ) . setDescription ( "Admin password" ) . setRequired ( true ) ) ,
74
+ new SlashCommandBuilder ( ) . setName ( "infocontest" ) . setDescription ( "View contest information!" )
75
+ . addStringOption ( option => option . setName ( "id" ) . setDescription ( "Contest ID" ) . setRequired ( true ) ) ,
76
+ new SlashCommandBuilder ( ) . setName ( "joincontest" ) . setDescription ( "Join contest!" )
77
+ . addStringOption ( option => option . setName ( "id" ) . setDescription ( "Contest ID" ) . setRequired ( true ) ) ,
78
+ new SlashCommandBuilder ( ) . setName ( "leavecontest" ) . setDescription ( "Leave contest!" )
79
+ . addStringOption ( option => option . setName ( "id" ) . setDescription ( "Contest ID" ) . setRequired ( true ) ) ,
80
+ new SlashCommandBuilder ( ) . setName ( "help" ) . setDescription ( "View help!" ) ,
81
+ new SlashCommandBuilder ( ) . setName ( "scoreboardcontest" ) . setDescription ( "View scoreboard contest!" )
82
+ . addStringOption ( option => option . setName ( "id" ) . setDescription ( "Contest ID" ) . setRequired ( true ) ) ,
83
+
39
84
40
85
] . map ( command => command . toJSON ( ) ) ;
41
86
@@ -44,6 +89,14 @@ const UserCommands: Array<RESTPostAPIChatInputApplicationCommandsJSONBody> = [
44
89
. addUserOption ( option => option . setName ( "hacker" ) . setDescription ( "Select hacker to view" ) ) ,
45
90
new SlashCommandBuilder ( ) . setName ( "update" ) . setDescription ( "Admin update system!" )
46
91
. addStringOption ( option => option . setName ( "password" ) . setDescription ( "Admin password" ) . setRequired ( true ) ) ,
92
+ new SlashCommandBuilder ( ) . setName ( "scoreboard" ) . setDescription ( "View scoreboard!" ) ,
93
+ new SlashCommandBuilder ( ) . setName ( "jointeam" ) . setDescription ( "Join team!" )
94
+ . addStringOption ( option => option . setName ( "idteam" ) . setDescription ( "Team ID" ) . setRequired ( true ) ) ,
95
+ new SlashCommandBuilder ( ) . setName ( "createteam" ) . setDescription ( "Create team!" )
96
+ . addStringOption ( option => option . setName ( "name" ) . setDescription ( "Team name" ) . setRequired ( true ) )
97
+ . addStringOption ( option => option . setName ( "description" ) . setDescription ( "Team description" ) . setRequired ( true ) ) ,
98
+ new SlashCommandBuilder ( ) . setName ( "leaveteam" ) . setDescription ( "Leave team!" )
99
+
47
100
] . map ( command => command . toJSON ( ) ) ;
48
101
49
102
export const registerSlashCommand = ( guildId : string ) => {
0 commit comments