.get in discordjs v12 code example
Example 1: discord.js create channel
guild.channels.create('new-general', { reason: 'Needed a cool new channel' })
.then(console.log)
.catch(console.error);
guild.channels.create('new-voice', {
type: 'voice',
permissionOverwrites: [
{
id: message.author.id,
deny: ['VIEW_CHANNEL'],
},
],
})
Example 2: discord js fetch user
<client>.users.fetch('UserID').then((user) => {
console.log(user);
}).catch(console.error);
const user = await <client>.users.fetch('UserID').catch(console.error);
console.log(user);