forked from Minecraft/minecraft_manager
Only query players with a valid application in the bot
parent
489012c016
commit
b91078a4a7
|
@ -119,8 +119,8 @@ class Discord(discord.Client):
|
||||||
info += "\n**This is only 10 applications out of {0} found. Please narrow your search if possible.**".format(
|
info += "\n**This is only 10 applications out of {0} found. Please narrow your search if possible.**".format(
|
||||||
len(applications))
|
len(applications))
|
||||||
else:
|
else:
|
||||||
players = Player.objects.filter(username__icontains=search)[:10]
|
players = Player.objects.filter(username__icontains=search, application__isnull=False)[:10]
|
||||||
count = Player.objects.filter(username__icontains=search).count()
|
count = Player.objects.filter(username__icontains=search, application__isnull=False).count()
|
||||||
if count > 0:
|
if count > 0:
|
||||||
if count == 1:
|
if count == 1:
|
||||||
yield from self.discord_message(message.channel, "No applications matched, however there is a player match.")
|
yield from self.discord_message(message.channel, "No applications matched, however there is a player match.")
|
||||||
|
|
Loading…
Reference in New Issue