mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 01:51:22 +01:00
Update getting guild member
This commit is contained in:
parent
e90992f9a5
commit
5e0c0bf302
@ -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:
|
||||||
await self.connection.set(key, "")
|
members = await guild.query_members(user_ids=[int(params["user_id"])], cache=True)
|
||||||
await self.enforce_expiring_key(key)
|
if not len(members):
|
||||||
return
|
await self.connection.set(key, "")
|
||||||
|
await self.enforce_expiring_key(key)
|
||||||
|
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