Package com.jtelegram.api.commands
Class CommandRegistry
- java.lang.Object
-
- com.jtelegram.api.commands.CommandRegistry
-
- All Implemented Interfaces:
EventHandler<TextMessageEvent>
public class CommandRegistry extends java.lang.Object implements EventHandler<TextMessageEvent>
-
-
Constructor Summary
Constructors Constructor Description CommandRegistry(TelegramBot bot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TelegramBot
getBot()
void
onEvent(TextMessageEvent event)
void
registerCommand(CommandFilter filter, CommandFilter... filters)
void
registerCommand(java.lang.String command, CommandFilter filter, CommandFilter... filters)
-
-
-
Constructor Detail
-
CommandRegistry
public CommandRegistry(TelegramBot bot)
-
-
Method Detail
-
registerCommand
public void registerCommand(CommandFilter filter, CommandFilter... filters)
-
registerCommand
public void registerCommand(java.lang.String command, CommandFilter filter, CommandFilter... filters)
-
onEvent
public void onEvent(TextMessageEvent event)
- Specified by:
onEvent
in interfaceEventHandler<TextMessageEvent>
-
getBot
public TelegramBot getBot()
-
-