public Ability unbanUser() {
    return builder()
        .name(UNBAN)
        .locality(ALL)
        .privacy(ADMIN)
        .input(1)
        .action(ctx -> {
          String username = stripTag(ctx.firstArg());
          Integer userId = getUserIdSendError(username, ctx);

          Set<Integer> blacklist = blacklist();

          if (!blacklist.remove(userId))
            silent.sendMd(getLocalizedMessage(ABILITY_UNBAN_FAIL, ctx.user().getLanguageCode(), escape(username)), ctx.chatId());
          else {
            silent.sendMd(getLocalizedMessage(ABILITY_UNBAN_SUCCESS, ctx.user().getLanguageCode(), escape(username)), ctx.chatId());
          }
        })
        .post(commitTo(db))
        .build();
  }
public Ability unbanUser ( ) { return builder ( ) . name ( UNBAN ) . locality ( ALL ) . privacy ( ADMIN ) . input ( 1 ) . action ( ctx -> { String username = stripTag ( ctx . firstArg ( ) ) ; Integer userId = getUserIdSendError ( username , ctx ) ; Set < Integer > blacklist = blacklist ( ) ; if ( ! blacklist . remove ( userId ) ) silent . sendMd ( getLocalizedMessage ( ABILITY_UNBAN_FAIL , ctx . user ( ) . getLanguageCode ( ) , escape ( username ) ) , ctx . chatId ( ) ) ; else { silent . sendMd ( getLocalizedMessage ( ABILITY_UNBAN_SUCCESS , ctx . user ( ) . getLanguageCode ( ) , escape ( username ) ) , ctx . chatId ( ) ) ; } } ) . post ( commitTo ( db ) ) . build ( ) ; }
Usage: <code>/unban @username</code>

@return the ability to unban a user