Add panic recovery, switch some fatal raises to panic

I don't know what I am doing really
This commit is contained in:
2024-02-16 17:28:32 -06:00
parent 595228df15
commit 069b77aebe
4 changed files with 26 additions and 15 deletions
+2 -4
View File
@@ -138,10 +138,8 @@ func SearchCommandHandler(session *discordgo.Session, interaction *discordgo.Int
if err != nil {
return errors.Wrap(err, "error parsing implied course code (high)")
}
}
// 4 digit code
if len(valueRaw) == 4 {
} else if len(valueRaw) == 4 {
// 4 digit code
low, err = strconv.Atoi(valueRaw)
if err != nil {
return errors.Wrap(err, "error parsing course code")