forked from Minecraft/canopeas
Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
jolheiser | 75bd31e00f |
|
@ -67,21 +67,19 @@ func init() {
|
|||
return "No application found for that player", nil
|
||||
}
|
||||
}
|
||||
} else 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
|
||||
}
|
||||
accepted := apps[0].Accepted
|
||||
|
||||
accepted := apps[0].Accepted
|
||||
if accepted == nil {
|
||||
return "Your application is still being reviewed, hang tight", nil
|
||||
} else if !*accepted {
|
||||
return "Your application was denied, good luck finding a new server", nil
|
||||
}
|
||||
|
||||
if nickname != "" {
|
||||
// Accepted, check for dupe user
|
||||
guild, err := cmd.session.State.Guild(cmd.message.GuildID)
|
||||
if err != nil {
|
||||
|
@ -100,6 +98,8 @@ func init() {
|
|||
if err := cmd.session.GuildMemberNickname(cmd.message.GuildID, cmd.message.Author.ID, nickname); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
}
|
||||
if err := cmd.session.GuildMemberRoleAdd(cmd.message.GuildID, cmd.message.Author.ID, cmd.config.Register.Role); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue