Remove member if not found

This commit is contained in:
Jeremy Zhang 2021-03-12 17:30:39 -08:00
parent f7bed7085e
commit 57d23e8d68

View File

@ -134,8 +134,7 @@ class RedisQueue:
if not member: if not member:
members = await guild.query_members(user_ids=[int(params["user_id"])], cache=True) members = await guild.query_members(user_ids=[int(params["user_id"])], cache=True)
if not len(members): if not len(members):
await self.connection.set(key, "") self.remove_member(member)
await self.enforce_expiring_key(key)
return return
else: else:
member = members[0] member = members[0]