Update terminology, add username check for later users
This commit is contained in:
parent
d88afa7a58
commit
cf905a51d6
1 changed files with 4 additions and 4 deletions
|
@ -78,12 +78,10 @@ channel = channel_data["id"]
|
|||
##################################
|
||||
# Get users
|
||||
|
||||
# People who are authorized to grant pancakes
|
||||
# People who are authorized to do verifications
|
||||
tagger_ids = {u["id"]: u["username"] for u in mm.get_users_by_usernames_list(TAGGERS)}
|
||||
|
||||
|
||||
users = {u["id"]: u for u in mm.get_users(in_channel=channel)}
|
||||
|
||||
for user in users.values():
|
||||
assert user["username"].find(" ") == -1, f"{user['username']} shouldn't have spaces in username"
|
||||
|
||||
|
@ -92,7 +90,9 @@ def get_username(userid):
|
|||
if userid not in users:
|
||||
users[userid] = mm.get_user(userid)
|
||||
|
||||
return users[userid]["username"]
|
||||
username = users[userid]["username"]
|
||||
assert username.find(" ") == -1, f"{username} shouldn't have spaces in username"
|
||||
return username
|
||||
|
||||
|
||||
##################################
|
||||
|
|
Loading…
Reference in a new issue