title: How can I migrate my code to Discord.js v12 from v11?
body: <p>I upgraded to Discord.js v12, but it broke my existing v11 code. Here are some examples of things that cause errors:</p>
  <pre class="lang-js prettyprint-override"><code>// TypeError: client.users.get is not a function
  const user = client.users.get('123456789012345678')
  
  // TypeError: message.guild.roles.find is not a function
  const role = message.guild.roles.find(r =&gt; r.name === 'Admin')
  
  // TypeError: message.member.addRole is not a function
  await message.member.addRole(role)
  
  // TypeError: message.guild.createChannel is not a function
  await message.guild.createChannel('welcome')
  
  // TypeError: message.channel.fetchMessages is not a function
  const messages = await message.channel.fetchMessages()
  
  const {RichEmbed} = require('discord.js')
  // TypeError: RichEmbed is not a constructor
  const embed = new RichEmbed()
  
  const connection = await message.channel.join()
  // TypeError: connection.playFile is not a function
  const dispatcher = connection.playFile('./music.mp3')
  </code></pre>
  <p>How can I migrate my code to Discord.js v12 and fix these errors? Where can I see the breaking changes v12 introduced?</p>