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