Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord js fetch user

//With .then
<client>.users.fetch('UserID').then((user) => {
	console.log(user);
}).catch(console.error);

//with async/await
const user = await <client>.users.fetch('UserID').catch(console.error);
console.log(user);
 
PREVIOUS NEXT
Tagged: #discord #js #fetch #user
ADD COMMENT
Topic
Name
6+2 =