Answers for "discord.js fetch messages"

5

Find channel discord js

// Insert the Channel ID in the brackets. TO find that, right click the
// channel and select "Copy ID". Discord Developer must be on.
let channel = message.guild.channels.cache.get(channelid)
Posted by: Guest on June-21-2020
0

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);
Posted by: Guest on January-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language