title: Why my !ban command dosen't work (User not found) DISCORD.NET / C#
body: <p>I'm trying to make a bot using Discord.NET in C#. If I try to ban a user with my command, an error is returned on my console app : <strong>User not found</strong></p>
  <p>My other commands are working</p>
  <p>My Task HandleCommandAsync :</p>
  <pre><code>    public async Task HandleCommandAsync(SocketMessage socketMessage)
      {
          var message = socketMessage as SocketUserMessage;
          var context = new SocketCommandContext(_client, message);
  
          if (message.Author.IsBot)
              return;
  
          int caracterPos = 0;
          if(message.HasStringPrefix(&quot;!&quot;, ref caracterPos))
          {
              var result = await _commands.ExecuteAsync(context, caracterPos, _services);
              if (!result.IsSuccess)
                  Console.WriteLine(result.ErrorReason);
              if (result.Error.Equals(CommandError.UnmetPrecondition))
                  await message.Channel.SendMessageAsync(result.ErrorReason);
          }
      }
  </code></pre>
  <p><em>result.ErrorReason</em> =&gt; &quot;User not found&quot;</p>
  <p><em>await message.Channel.SendMessageAsync(result.ErrorReason);</em> =&gt; don't send a message</p>
  <p>My command in my commands.cs class :</p>
  <pre><code>    [Command(&quot;ban&quot;)]
      [RequireUserPermission(GuildPermission.BanMembers, ErrorMessage = &quot;Tu n'as pas la permission de bannir des membres !&quot;)]
      public async Task BanMember(SocketGuildUser user = null, [Remainder] string reason = null)
      {
          if (user == null)
          {
              await ReplyAsync(&quot;Aucun Utilisateur spécifié&quot;);
              return;
          }
          if (reason == null)
              reason = &quot;Raison non-spécifiée&quot;;
  
          var embedBuilder = new EmbedBuilder()
              .WithDescription($&quot;:white_check_mark: {user.Mention} a été banni\n**Raison :** {reason}&quot;)
              .WithColor(new Color(255,0,0));
          Embed embed = embedBuilder.Build();
          await ReplyAsync(embed: embed);
          await Context.Guild.AddBanAsync(user, 0, reason);
      }
  </code></pre>
  <p>My command in Discord : !ban @user reason</p>
  <p>Thanks for your help !</p>
  <p>LPR</p>