title: How do I unban user with commands?
body: <p>I am trying to make a command that unbans someone.</p>
  <p>I have tried <code>member.unban</code>, <code>message.guild.unban</code> and the current one,
  <code>message.guild.members.unban</code>.</p>
  <p>I am not quite sure what to do.</p>
  <p>Here is my current code:</p>
  <pre class="lang-js prettyprint-override"><code>    const Discord = require('discord.js');
  
      module.exports = {
          name: &quot;unban&quot;,
          description: &quot;unbans a member from the server&quot;,
          
      
          async run (client, message, args) {
      
              if(!message.member.hasPermission(&quot;BAN_MEMBERS&quot;)) return message.channel.send('You can\'t use that!')
              if(!message.guild.me.hasPermission(&quot;BAN_MEMBERS&quot;)) return message.channel.send('I don\'t have the permissions.')
      
              const member = message.mentions.members.first();
      
              if(!args[0]) return message.channel.send('Please specify a user');
      
      
      
              
      
              let reason = args.slice(1).join(&quot; &quot;);
      
              if(!reason) reason = 'Unspecified';
      
              message.guild.members.unban(`${member}`, `${reason}`)
              .catch(err =&gt; {
                  if(err) return message.channel.send('Something went wrong')
              })
      
              const banembed = new Discord.MessageEmbed()
              .setTitle('Member Unbanned')
              .addField('User Unbanned', member)
              .addField('Unbanned by', message.author)
              .addField('Reason', reason)
              .setFooter('Time Unbanned', client.user.displayAvatarURL())
              .setTimestamp()
      
              message.channel.send(banembed);
      
      
          }
      }
  </code></pre>
  <p>I don't get any error on my command prompt, but this is what shows up in discord: <a href="https://i.stack.imgur.com/tEEvR.png" rel="nofollow noreferrer">Image</a> and the user remains unbanned.</p>