forked from Minecraft/minecraft_manager
Link Application to Player if exists
parent
c45f5529c7
commit
16825f0dd2
|
@ -93,6 +93,10 @@ class Discord(discord.Client):
|
|||
if not application.accepted:
|
||||
application.accepted = accept
|
||||
application.save()
|
||||
if Player.objects.filter(username__iexact=application.username).exists():
|
||||
player = Player.objects.get(username__iexact=application.username)
|
||||
player.application_id = application.id
|
||||
player.save()
|
||||
msg = "App ID **{0}** was successfully {1}.".format(match.group(2), "accepted" if accept else "denied")
|
||||
api.plugin("accept" if accept else "deny", application.username)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue