public void onCommandMessage(AbstractTelegramBot bot, Update update, Message message, List<String> list) throws TelegramApiException {
String userName = message.getFrom().getFirstName();
if (message.getFrom().getUserName() != null) {
userName = message.getFrom().getUserName();
}
if (!createdAdmin.get() && dbUserService.findAll().isEmpty()) {
if (createdAdmin.compareAndSet(false, true)) {
if (dbUserService.findById(message.getFrom().getId()) == null) {
dbUserService.create(message.getFrom().getId(), userName, 10);
}
BotUtil.sendMessage(bot, message, LocalisationService.getString("start.welcomeMessage"), false, false, KeyboardBuilder
.inline()
.button(LocalisationService.getString("start.buttonCallbackName"), "getBonus:" + message.getFrom().getId())
.row()
.buttonUrl(LocalisationService.getString("start.buttonUrlName"), LocalisationService.getString("t.me/se1dhe_dev"))
.build());
}
} else {
if (dbUserService.findById(message.getFrom().getId()) == null) {
createdAdmin.set(true);
dbUserService.create(message.getFrom().getId(), userName, 0);
}
BotUtil.sendMessage(bot, message, LocalisationService.getString("start.welcomeMessage"), false, false, KeyboardBuilder
.inline()
.button(LocalisationService.getString("start.buttonCallbackName"), "getPrize")
.row()
.buttonUrl(LocalisationService.getString("start.buttonUrlName"), LocalisationService.getString("start.buttonUrlData"))
.build());
}
}