Skip to content

Commit

Permalink
Renamed UseItemHandler2 to UseItemHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
johnddiscovery committed Dec 10, 2018
1 parent 6cfaa4b commit 26e9c59
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public Bots buildFightClubBot() {

addHandler(new RegisterHandler(botName, botAPI));
addHandler(new RollHandler(botName, botAPI));
addHandler(new UseItemHandler2(botName, botAPI));
addHandler(new UseItemHandler(botName, botAPI));
addHandler(new RankingsHandler(botName, botAPI));
addHandler(new OptionsHandler(botName, botAPI));
addHandler(new AbuseHandler(botName, botAPI));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private Item determineItemToUse(IUpdate update, FighterDAO fighterDAO) {

List<Item> carried = fighterDAO.getAllUncarriedItemsFrom(update.getChatId());
for (Item item : carried) {
String thisItemDescription = UseItemHandler2.makeItemButtonText(item);
String thisItemDescription = UseItemHandler.makeItemButtonText(item);

This comment has been minimized.

Copy link
@EvanKnowles

EvanKnowles Dec 10, 2018

Owner

Logged this to clean up some day.

if (thisItemDescription.trim().equals(desiredItemDescription)) {
return item;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
/**
* Created by evan on 2016/04/08.
*/
public class UseItemHandler2 extends ActiveFighterMessageHandler implements IResponseMessageHandler<ItemDetails> {
public class UseItemHandler extends ActiveFighterMessageHandler implements IResponseMessageHandler<ItemDetails> {

public UseItemHandler2(String botName, IBotAPI bot) {
public UseItemHandler(String botName, IBotAPI bot) {
super(botName, "use", bot, true);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package za.co.knonchalant.telegram.handlers.fightclub;

import com.pengrad.telegrambot.model.request.InlineKeyboardButton;
import com.pengrad.telegrambot.model.request.InlineKeyboardMarkup;
import com.pengrad.telegrambot.model.request.ParseMode;
import com.pengrad.telegrambot.model.request.ReplyKeyboardMarkup;
import za.co.knonchalant.candogram.domain.PendingResponse;
Expand Down Expand Up @@ -73,7 +71,7 @@ protected Item determineItemToUse(IUpdate update, FighterDAO fighterDAO, Fighter

List<Item> carried = fighterDAO.getItemsCarriedBy(fighter.getId());
for (Item item : carried) {
String thisItemDescription = UseItemHandler2.makeItemButtonText(item);
String thisItemDescription = UseItemHandler.makeItemButtonText(item);
if (thisItemDescription.trim().equals(desiredItemDescription)) {
return item;
}
Expand Down

0 comments on commit 26e9c59

Please sign in to comment.