From d09db4ddce44f1a9e03df23d8be09b57d360af1a Mon Sep 17 00:00:00 2001 From: Etzelia Date: Thu, 11 Jun 2020 01:05:33 -0500 Subject: [PATCH] Clean and clarify Signed-off-by: Etzelia --- discord/register.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/discord/register.go b/discord/register.go index 470f35d..6ac19c8 100644 --- a/discord/register.go +++ b/discord/register.go @@ -39,26 +39,23 @@ func init() { var accepted bool if len(players) > 0 { nickname = players[0].Username - if len(apps) > 0 { - accepted = apps[0].Accepted - } else { + if len(apps) == 0 { apps, err = models.Application(models.NewDjangoBuilder().Exact(django.ApplicationID, fmt.Sprintf("%d", players[0].ApplicationID))) if len(apps) == 0 { return errors.New("something hecked up, please contact staff") } - accepted = apps[0].Accepted } } else if len(apps) > 0 { - accepted = apps[0].Accepted if accepted { return errors.New("please join the server and then re-try this command") } } else { return errors.New("no player or applications found for that username") } + accepted = apps[0].Accepted if !accepted { - return errors.New("sorry, your application was denied") + return errors.New("sorry, your application was denied or is still in review") } // Accepted