Set empty role list if member does not exist

This commit is contained in:
Jeremy "EndenDragon" Zhang 2021-01-22 14:01:39 -08:00 committed by GitHub
parent cf58e83f58
commit f2d9f13bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,6 +200,8 @@ def check_user_in_guild(guild_id):
def get_member_roles(guild_id, user_id):
q = redisqueue.get_guild_member(guild_id, user_id)
if not q:
return []
roles = q["roles"]
role_converted = []
for role in roles: