mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 22:47:04 +01:00
Revert "Revert "Update getting guild member""
This reverts commit 5ec9197a09
.
This commit is contained in:
parent
5ec9197a09
commit
f7bed7085e
@ -132,9 +132,13 @@ class RedisQueue:
|
|||||||
return
|
return
|
||||||
member = guild.get_member(int(params["user_id"]))
|
member = guild.get_member(int(params["user_id"]))
|
||||||
if not member:
|
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.connection.set(key, "")
|
||||||
await self.enforce_expiring_key(key)
|
await self.enforce_expiring_key(key)
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
member = members[0]
|
||||||
user = get_formatted_user(member)
|
user = get_formatted_user(member)
|
||||||
await self.connection.set(key, json.dumps(user, separators=(',', ':')))
|
await self.connection.set(key, json.dumps(user, separators=(',', ':')))
|
||||||
await self.enforce_expiring_key(key)
|
await self.enforce_expiring_key(key)
|
||||||
|
Loading…
Reference in New Issue
Block a user