// Path: src/main/java/ch/urbanfox/freqtrade/event/model/CommandEvent.java
// public class CommandEvent {
// 
//     private final String command;
// 
//     private final String[] params;
// 
//     public CommandEvent(String command, String... params) {
//         this.command = command;
//         this.params = params;
//     }
// 
//     public String getCommand() {
//         return command;
//     }
// 
//     public String[] getParams() {
//         return params;
//     }
// 
//     @Override
//     public String toString() {
//         return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
//     }
// }
// 
// Path: src/main/java/ch/urbanfox/freqtrade/telegram/TelegramService.java
// public interface TelegramService {
// 
//     /**
//      * Sends a message to the user of the application
//      *
//      * @param message the content of the message
//      * @throws TelegramApiException if any error occurs while using Telegram API
//      */
//     void sendMessage(String message) throws TelegramApiException;
// 
//     void sendMessage(String message, String parseMode) throws TelegramApiException;
// 
// }
// 
// Path: src/main/java/ch/urbanfox/freqtrade/telegram/command/CommandHandler.java
// public interface CommandHandler {
// 
//     String getCommandName();
// 
// }


import java.util.Set;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import org.telegram.telegrambots.exceptions.TelegramApiException;
import ch.urbanfox.freqtrade.event.model.CommandEvent;
import ch.urbanfox.freqtrade.telegram.TelegramService;
import ch.urbanfox.freqtrade.telegram.command.CommandHandler;
package ch.urbanfox.freqtrade.event;




@Component
public class CommandEventListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(CommandEventListener.class);

    private final TelegramService telegramService;

    private final Set<String> availableCommandNames;

    @Autowired
// Path: src/main/java/ch/urbanfox/freqtrade/event/model/CommandEvent.java
// public class CommandEvent {
// 
//     private final String command;
// 
//     private final String[] params;
// 
//     public CommandEvent(String command, String... params) {
//         this.command = command;
//         this.params = params;
//     }
// 
//     public String getCommand() {
//         return command;
//     }
// 
//     public String[] getParams() {
//         return params;
//     }
// 
//     @Override
//     public String toString() {
//         return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
//     }
// }
// 
// Path: src/main/java/ch/urbanfox/freqtrade/telegram/TelegramService.java
// public interface TelegramService {
// 
//     /**
//      * Sends a message to the user of the application
//      *
//      * @param message the content of the message
//      * @throws TelegramApiException if any error occurs while using Telegram API
//      */
//     void sendMessage(String message) throws TelegramApiException;
// 
//     void sendMessage(String message, String parseMode) throws TelegramApiException;
// 
// }
// 
// Path: src/main/java/ch/urbanfox/freqtrade/telegram/command/CommandHandler.java
// public interface CommandHandler {
// 
//     String getCommandName();
// 
// }


// Path: src/main/java/ch/urbanfox/freqtrade/event/CommandEventListener.java
import java.util.Set;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import org.telegram.telegrambots.exceptions.TelegramApiException;
import ch.urbanfox.freqtrade.event.model.CommandEvent;
import ch.urbanfox.freqtrade.telegram.TelegramService;
import ch.urbanfox.freqtrade.telegram.command.CommandHandler;

package ch.urbanfox.freqtrade.event;




@Component
public class CommandEventListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(CommandEventListener.class);

    private final TelegramService telegramService;

    private final Set<String> availableCommandNames;

    @Autowired
    public CommandEventListener(TelegramService telegramService, Set<CommandHandler> handlers) {