title: Kicking a user in Discord.Net
body: <p>I made this code to kick a user from the guild of a discord server</p>
  
  <p>The bot console doesn't give me any errors, but this code doesn't work properly when I try to kick a user.
  What I mean by this is that it doesn't kick the user, and it doesn't output anything in the channel.</p>
  
  <p>I also checked the bots permissions, and updated these so this can't be the problem.</p>
  
  <p>The version of discord.net is 1.0.2</p>
  
  <pre><code>    [Command("kick"), Alias("Kick"), Summary("Kicks a user from the server")]
      public async Task Kick(SocketGuildUser userAccount, string reason)
      {
          var user = Context.User as SocketGuildUser;
          var role = (user as IGuildUser).Guild.Roles.FirstOrDefault(x =&gt; x.Name == "Admin");
          if (!userAccount.Roles.Contains(role))
          {
              if (user.GuildPermissions.KickMembers)
              {
                  await userAccount.KickAsync(reason);
                  await Context.Channel.SendMessageAsync($"The user `{userAccount}` has been kicked, for {reason}");
              }
              else
              {
                  await Context.Channel.SendMessageAsync("No permissions for kicking a user.");
              }
          }
          else
          {
              await Context.Channel.SendMessageAsync("This User can't be kicked, because the user has a admin role.");
          }
      }
  </code></pre>