Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Get a user #7

Closed
SimonLeclere opened this issue Aug 22, 2020 · 1 comment
Closed

Suggestion: Get a user #7

SimonLeclere opened this issue Aug 22, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@SimonLeclere
Copy link

SimonLeclere commented Aug 22, 2020

Function to retrieve a user using their nickname or id.

@Androz2091 Androz2091 changed the title Suggestion : Get un utilisateur + Abonnement / désabonnement Suggestion: Get a user Aug 22, 2020
@Androz2091 Androz2091 added the enhancement New feature or request label Aug 22, 2020
@Androz2091
Copy link
Owner

This is now available with v1.2.0 ✅

// using username
client.fetchUser('pronote_bot').then((user) => {
    console.log(user); // user object
    console.log(user.id); // 11107333911
});

// using user id
client.fetchUser(11107333911).then((user) => {
    console.log(user); // user object
    console.log(user.username); // pronote_bot
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants