Revert "Update getting guild member"

This reverts commit 5e0c0bf302.
This commit is contained in:
Jeremy Zhang 2021-03-12 17:05:52 -08:00
parent 10e01c57ed
commit 5ec9197a09

View File

@ -132,13 +132,9 @@ class RedisQueue:
return
member = guild.get_member(int(params["user_id"]))
if not member:
members = await guild.query_members(user_ids=[int(params["user_id"])], cache=True)
if not len(members):
await self.connection.set(key, "")
await self.enforce_expiring_key(key)
return
else:
member = members[0]
await self.connection.set(key, "")
await self.enforce_expiring_key(key)
return
user = get_formatted_user(member)
await self.connection.set(key, json.dumps(user, separators=(',', ':')))
await self.enforce_expiring_key(key)