Increase course title option length, increase min code length

This commit is contained in:
2024-02-16 15:12:21 -06:00
parent e084927b48
commit 07b3146868

View File

@@ -28,17 +28,18 @@ var SearchCommandDefinition = &discordgo.ApplicationCommand{
Description: "Search for a course", Description: "Search for a course",
Options: []*discordgo.ApplicationCommandOption{ Options: []*discordgo.ApplicationCommandOption{
{ {
Type: discordgo.ApplicationCommandOptionString, Type: discordgo.ApplicationCommandOptionString,
MinLength: GetPointer(0), MinLength: GetPointer(0),
MaxLength: 16, MaxLength: 48,
Name: "title", Name: "title",
Description: "Course Title", Description: "Course Title (exact, use autocomplete)",
Required: false, Required: false,
Autocomplete: true,
}, },
{ {
Type: discordgo.ApplicationCommandOptionString, Type: discordgo.ApplicationCommandOptionString,
Name: "code", Name: "code",
MinLength: GetPointer(2), MinLength: GetPointer(4),
Description: "Course Code (e.g. 3743, 3000-3999, 3xxx, 3000-)", Description: "Course Code (e.g. 3743, 3000-3999, 3xxx, 3000-)",
Required: false, Required: false,
}, },
@@ -52,7 +53,20 @@ var SearchCommandDefinition = &discordgo.ApplicationCommand{
Type: discordgo.ApplicationCommandOptionString, Type: discordgo.ApplicationCommandOptionString,
Name: "keywords", Name: "keywords",
Description: "Keywords in Title or Description (space separated)", Description: "Keywords in Title or Description (space separated)",
Required: false, },
{
Type: discordgo.ApplicationCommandOptionString,
Name: "instructor",
Description: "Instructor Name",
Required: false,
Autocomplete: true,
},
{
Type: discordgo.ApplicationCommandOptionString,
Name: "subject",
Description: "Subject (e.g. Computer Science/CS, Mathematics/MAT)",
Required: false,
Autocomplete: true,
}, },
}, },
} }