Compare commits

..

1 Commits

Author SHA1 Message Date
jolheiser 296c7ec3c6
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:40:33 -05:00
1 changed files with 5 additions and 7 deletions

View File

@ -67,14 +67,12 @@ func init() {
return "No application found for that player", nil return "No application found for that player", nil
} }
} }
} else if len(cmd.message.Member.Roles) == 0 { } else if len(apps) > 0 && len(cmd.message.Member.Roles) == 0 {
if len(apps) > 0 { if apps[0].Accepted != nil && *apps[0].Accepted {
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
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
} }
} else {
return "No player or applications found for that username", nil
} }
accepted := apps[0].Accepted accepted := apps[0].Accepted