Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package com.github.netkorp.simplecommand.commands; |
||
7 | @Component |
||
8 | public class NameCommand extends AbstractCommand { |
||
9 | |||
10 | /** |
||
11 | * Processes the data of the commands. |
||
12 | * |
||
13 | * @param update The received message. |
||
14 | */ |
||
15 | @Override |
||
16 | public void execute(Update update) { |
||
17 | bot.sendMessage(update.getMessage().getChat().getFirstName(), update.getMessage().getChatId()); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Returns the description of the commands. |
||
22 | * |
||
23 | * @return The description. |
||
24 | */ |
||
25 | @Override |
||
26 | public String description() { |
||
27 | return "It tells you what your first name is"; |
||
28 | } |
||
30 |