src/main/java/seedu/address/bot/ArkBot.java
public Ability deleteCommand() {
        return Ability
                .builder()
                .name(DeleteCommand.COMMAND_WORD)
                .info("deletes parcel at selected index")
                .input(0)
                .locality(Locality.ALL)
                .privacy(PRIVACY_SETTING)
                .action((MessageContext ctx) -> Platform.runLater(() -> {
                    try {
                        logic.execute(DeleteCommand.COMMAND_WORD + " "
                                + combineArguments(ctx.arguments()));
                        ObservableList<ReadOnlyParcel> parcels = model.getUncompletedParcelList();
                        sender.send(parseDisplayParcels(formatParcelsForBot(parcels)), ctx.chatId());
                    } catch (CommandException | ParseException e) {
                        sender.send(BOT_MESSAGE_FAILURE, ctx.chatId());
                    } catch (NullPointerException e) {
                        e.printStackTrace();
                    }
                }))
                .build();
    }
/**
     * Replicates the effects of DeleteCommand on ArkBot.
     */
Replicates the effects of DeleteCommand on ArkBot.
Replicates the effects of DeleteCommand on ArkBot .
public Ability deleteCommand() {
        return Ability
                .builder()
                .name(DeleteCommand.COMMAND_WORD)
                .info("deletes parcel at selected index")
                .input(0)
                .locality(Locality.ALL)
                .privacy(PRIVACY_SETTING)
                .action((MessageContext ctx) -> Platform.runLater(() -> {
                    try {
                        logic.execute(DeleteCommand.COMMAND_WORD + " "
                                + combineArguments(ctx.arguments()));
                        ObservableList<ReadOnlyParcel> parcels = model.getUncompletedParcelList();
                        sender.send(parseDisplayParcels(formatParcelsForBot(parcels)), ctx.chatId());
                    } catch (CommandException | ParseException e) {
                        sender.send(BOT_MESSAGE_FAILURE, ctx.chatId());
                    } catch (NullPointerException e) {
                        e.printStackTrace();
                    }
                }))
                .build();
    }
public Ability deleteCommand ( ) { return Ability . builder ( ) . name ( DeleteCommand . COMMAND_WORD ) . info ( "deletes parcel at selected index" ) . input ( 0 ) . locality ( Locality . ALL ) . privacy ( PRIVACY_SETTING ) . action ( ( MessageContext ctx ) -> Platform . runLater ( ( ) -> { try { logic . execute ( DeleteCommand . COMMAND_WORD + " " + combineArguments ( ctx . arguments ( ) ) ) ; ObservableList < ReadOnlyParcel > parcels = model . getUncompletedParcelList ( ) ; sender . send ( parseDisplayParcels ( formatParcelsForBot ( parcels ) ) , ctx . chatId ( ) ) ; } catch ( CommandException | ParseException e ) { sender . send ( BOT_MESSAGE_FAILURE , ctx . chatId ( ) ) ; } catch ( NullPointerException e ) { e . printStackTrace ( ) ; } } ) ) . build ( ) ; }
Replicates the effects of DeleteCommand on ArkBot.
Replicates the effects of DeleteCommand on ArkBot .