Added case for apps still in review.

reminder
Joey Hines 2018-12-11 10:53:41 -06:00
parent a34b8b7918
commit 1b0c1ab8df
1 changed files with 7 additions and 3 deletions

View File

@ -105,12 +105,16 @@ class Discord(discord.Client):
return
else:
count = Player.objects.filter(username__iexact=search, application__accepted=False).count()
app = Application.objects.filter(username__iexact=search).first()
if count == 0:
if app is None:
msg = "{0}, an application for {1} could not be found, please check your username and make sure you have applied.".format(message.author.mention, search)
else:
elif app.accepted is None:
msg = "{0}, your application is still in review, please try again when you have been accepted on the server.".format(message.author.mention)
elif not app.accepted:
msg = "{0}, your application has been denied. Best of luck finding a new server!".format(message.author.mention)
else:
msg = "{0}, an error has occurred. Please try again in a few minutes.".format(message.author.mention)
yield from self.discord_message(message.channel, msg)
return