Total Complexity | 1 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | package com.github.netkorp.telegram.framework.commands.interfaces; |
||
10 | public interface SimpleCommand extends Command { |
||
11 | |||
12 | /** |
||
13 | * Executes the command's logic taking parameters. |
||
14 | * |
||
15 | * @param update the received message. |
||
16 | * @param args the parameters passed to the command execution. |
||
17 | */ |
||
18 | void execute(final Update update, String[] args); |
||
19 | |||
20 | /** |
||
21 | * Executes the command's logic without taking parameters. |
||
22 | * |
||
23 | * @param update the received message. |
||
24 | */ |
||
25 | default void execute(final Update update) { |
||
26 | this.execute(update, new String[]{}); |
||
27 | } |
||
29 |