Compare commits

..

1 Commits

Author SHA1 Message Date
jolheiser 97ddafcaf6
fix: allow user to register if they have 1 role
This assumes that the role is for onboarding purposes in-between seasons

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2024-06-17 19:44:29 -05:00
1 changed files with 7 additions and 5 deletions

View File

@ -67,13 +67,15 @@ func init() {
return "No application found for that player", nil
}
}
} else if len(apps) > 0 && len(cmd.message.Member.Roles) == 0 {
} else if len(cmd.message.Member.Roles) == 0 {
if len(apps) > 0 {
if apps[0].Accepted != nil && *apps[0].Accepted {
return fmt.Sprintf("Please join the server at `%s` and then re-try this command", cmd.config.Register.URL), nil
}
} else {
return "No player or applications found for that username", nil
}
}
accepted := apps[0].Accepted
if accepted == nil {