fix: remove role check
Signed-off-by: jolheiser <john.olheiser@gmail.com>pull/19/head
parent
97ddafcaf6
commit
b81c6f7051
|
@ -19,7 +19,7 @@ func init() {
|
||||||
commands = append(commands, &command{
|
commands = append(commands, &command{
|
||||||
name: "register",
|
name: "register",
|
||||||
validate: func(cmd commandInit) bool {
|
validate: func(cmd commandInit) bool {
|
||||||
return len(cmd.message.Member.Roles) <= 1
|
return len(cmd.message.Member.Roles) == 0
|
||||||
},
|
},
|
||||||
run: func(cmd commandInit) (string, error) {
|
run: func(cmd commandInit) (string, error) {
|
||||||
args := strings.Fields(cmd.message.Content)
|
args := strings.Fields(cmd.message.Content)
|
||||||
|
@ -67,17 +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 {
|
|
||||||
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 {
|
if len(apps) == 0 {
|
||||||
return "No player or applications found for that username", nil
|
return "No player or applications found for that username", nil
|
||||||
}
|
}
|
||||||
}
|
|
||||||
accepted := apps[0].Accepted
|
|
||||||
|
|
||||||
|
accepted := apps[0].Accepted
|
||||||
if accepted == nil {
|
if accepted == nil {
|
||||||
return "Your application is still being reviewed, hang tight", nil
|
return "Your application is still being reviewed, hang tight", nil
|
||||||
} else if !*accepted {
|
} else if !*accepted {
|
||||||
|
|
Loading…
Reference in New Issue