public interface ICommandRegistry
| Modifier and Type | Method and Description |
|---|---|
boolean |
deregister(IBotCommand botCommand)
deregister a command
|
Map<IBotCommand,Boolean> |
deregisterAll(IBotCommand... botCommands)
deregister multiple commands
|
IBotCommand |
getRegisteredCommand(String commandIdentifier)
get registered command
|
Collection<IBotCommand> |
getRegisteredCommands()
get a collection of all registered commands
|
boolean |
register(IBotCommand botCommand)
register a command
|
Map<IBotCommand,Boolean> |
registerAll(IBotCommand... botCommands)
register multiple commands
|
void |
registerDefaultAction(BiConsumer<org.telegram.telegrambots.meta.bots.AbsSender,org.telegram.telegrambots.meta.api.objects.Message> defaultConsumer)
Register a default action when there is no command register that match the message sent
|
void registerDefaultAction(BiConsumer<org.telegram.telegrambots.meta.bots.AbsSender,org.telegram.telegrambots.meta.api.objects.Message> defaultConsumer)
defaultConsumer - Consumer to evaluate the messageboolean register(IBotCommand botCommand)
botCommand - the command to registerMap<IBotCommand,Boolean> registerAll(IBotCommand... botCommands)
botCommands - commands to registerboolean deregister(IBotCommand botCommand)
botCommand - the command to deregisterMap<IBotCommand,Boolean> deregisterAll(IBotCommand... botCommands)
botCommands - commands to deregisterCollection<IBotCommand> getRegisteredCommands()
IBotCommand getRegisteredCommand(String commandIdentifier)
Copyright © 2019. All rights reserved.