From 5d0f508b5a51c6d8180bd3e850b65a7bb386435c Mon Sep 17 00:00:00 2001 From: tschulz Date: Fri, 20 May 2016 11:08:16 +0200 Subject: [PATCH] Create interface for the registry of all comannds of a bot --- .../api/commands/ICommandRegistery.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/main/java/org/telegram/telegrambots/api/commands/ICommandRegistery.java diff --git a/src/main/java/org/telegram/telegrambots/api/commands/ICommandRegistery.java b/src/main/java/org/telegram/telegrambots/api/commands/ICommandRegistery.java new file mode 100644 index 00000000..55cbe647 --- /dev/null +++ b/src/main/java/org/telegram/telegrambots/api/commands/ICommandRegistery.java @@ -0,0 +1,42 @@ +package org.telegram.telegrambots.api.commands; + +import java.util.Map; + +/** + * + */ +public interface ICommandRegistery { + + /** + * register a command + * + * @param command the command to register + * @return whether the command could be registered, was not already registered + */ + boolean register(Command command); + + /** + * register multiple commands + * + * @param commands commands to register + * @return map with results of the command register per command + */ + Map registerAll(Command... commands); + + /** + * deregister a command + * + * @param command the command to deregister + * @return whether the command could be deregistered, was registered + */ + boolean deregister(Command command); + + /** + * deregister multiple commands + * + * @param commands commands to deregister + * @return map with results of the command deregistered per command + */ + Map deregisterAll(Command... commands); + +} \ No newline at end of file