access profiles with username instead of id
This commit is contained in:
@ -20,14 +20,14 @@ class Profiles
|
||||
|
||||
let profiles = []
|
||||
response_data.forEach((profile) => {
|
||||
profiles.push(new Profile(this.client, profile.user_id, profile.username, profile.avatar_url))
|
||||
profiles.push(new Profile(this.client, profile.username, profile.user_id, profile.avatar_url))
|
||||
});
|
||||
return profiles;
|
||||
}
|
||||
|
||||
async getProfile(user_id)
|
||||
async getProfile(username)
|
||||
{
|
||||
let profile = new Profile(this.client, user_id);
|
||||
let profile = new Profile(this.client, username);
|
||||
if (await profile.init())
|
||||
return null;
|
||||
return profile;
|
||||
|
Reference in New Issue
Block a user