Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Commit

Permalink
No longer populate games with this method
Browse files Browse the repository at this point in the history
I will be implementing #19
  • Loading branch information
bsquidwrd committed Jan 11, 2017
1 parent 8ff0a5b commit 1096488
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions cogs/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,6 @@ async def on_member_update(self, before, after):
server = self.get_server(after.server)
user = self.get_user(after)
server_user = self.get_server_user(user=user, server=server)
if not user or after.bot:
return
if before.game:
member = before
else:
member = after
game = member.game
if game is None:
return
possible_games = Game.objects.filter(name=game.name.strip())
if possible_games.count() == 0:
game = Game.objects.create(name=game.name.strip(), url=game.url)
GameUser.objects.get_or_create(user=user, game=game)
elif possible_games.count() == 1:
game = possible_games[0]
GameUser.objects.get_or_create(user=user, game=game)

async def run_tasks(self):
try:
Expand Down

0 comments on commit 1096488

Please sign in to comment.