com.github.netkorp.simplecommand.commands.NameCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute(Update,String[]) 0 3 1
1
package com.github.netkorp.simplecommand.commands;
2
3
import com.github.netkorp.telegram.framework.annotations.TelegramCommand;
4
import com.github.netkorp.telegram.framework.commands.abstracts.AbstractSimpleCommand;
5
import org.telegram.telegrambots.meta.api.objects.Update;
6
7
@TelegramCommand(name = "name")
8
public class NameCommand extends AbstractSimpleCommand {
9
10
    /**
11
     * Processes the data sent by the users.
12
     *
13
     * @param update the received message.
14
     * @param args   the parameters passed to the command execution.
15
     */
16
    @Override
17
    public void execute(Update update, String[] args) {
18
        bot.sendMessage(update.getMessage().getChat().getFirstName(), update.getMessage().getChatId());
19
    }
20
}
21