title: DiscordJS v12 userinfo command not working
body: <p>I have been making a Discord.JS bot and I have an issue with my !userinfo command. There are quite a few issues I am facing but all of them because I don't know how to handle Promises in DiscordJS correctly. No site has been helping me. I have included comments under the lines giving me issues.</p>
  <pre><code>            const memberemb = message.guild.members.fetch(user);
          Promise.resolve(memberemb).then(function () {
              console.log(memberemb.roles);
              const embed = new Discord.MessageEmbed()
                  .setColor(&quot;RANDOM&quot;)
                  .setThumbnail(message.author.avatarURL)
                  .addField(`${user.tag}`, `${user}`, true)
                  .addField(&quot;ID:&quot;, `${user.id}`, true)
                  .addField(&quot;Nickname:&quot;, `${useralso.nickname ? `${useralso.nickname}` : 'None'}`, true)
                  .addField(&quot;Status:&quot;, `${user.presence.status}`, true)
                  // always shows offline in status
                  .addField(&quot;Game:&quot;, `${user.presence.game ? user.presence.game.name : 'None'}`, true)
                  //idk if it shows games correctly
                  .addField(&quot;Joined The Server On:&quot;, `${moment.utc(memberemb.joinedAt).format(&quot;dddd, MMMM Do YYYY&quot;)}`, true)
                  //shows date of today not of the joined on date
                  .addField(&quot;Account Created On:&quot;, `${moment.utc(user.createdAt).format(&quot;dddd, MMMM Do YYYY&quot;)}`, true)
                  .addField(&quot;Roles:&quot;, memberemb.roles ? memberemb.roles.map(roles =&gt; `${roles}`).join(', ') : &quot;None&quot;, true)
                  //shows none as roles
                  .setFooter(`Replying to ${message.author.username}#${message.author.discriminator}`)
              message.channel.send({ embed });
          });
          break;
  </code></pre>
  <p>Please explain how to fix this and also rewrite the code correctly(please) so I can use it for my bot <br>
  Thank you</p>