Skip to content

Commit

Permalink
update bot
Browse files Browse the repository at this point in the history
  • Loading branch information
kocherovv committed Feb 13, 2024
1 parent 49e305d commit 8150d79
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
6 changes: 0 additions & 6 deletions src/main/java/com/greenapi/demoChatbot/BotConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@
import com.greenapi.chatbot.pkg.BotFactory;
import com.greenapi.chatbot.pkg.state.StateManager;
import com.greenapi.chatbot.pkg.state.StateManagerHashMapImpl;
import com.greenapi.demoChatbot.scenes.Endpoints;
import com.greenapi.demoChatbot.scenes.MainMenu;
import com.greenapi.demoChatbot.scenes.Start;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.client.RestTemplate;

@Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.greenapi.demoChatbot.util.YmlReader;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/greenapi/demoChatbot/scenes/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
import com.greenapi.demoChatbot.util.SessionManager;
import com.greenapi.demoChatbot.util.YmlReader;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.File;
import java.net.URI;
import java.nio.file.Paths;

@Component
Expand Down Expand Up @@ -80,7 +77,7 @@ private State sendMainMenu(MessageWebhook incomingMessage, State currentState, L
answerWithUploadFile(incomingMessage, welcomeFile,
YmlReader.getString(new String[]{"welcome_message", language.getValue()}) +
incomingMessage.getSenderData().getSenderName() + "\n" +
YmlReader.getString(new String[]{"menu",language.getValue()}), false
YmlReader.getString(new String[]{"menu", language.getValue()}), false
);

return activateNextScene(currentState, endpointsScene);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/greenapi/demoChatbot/scenes/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.greenapi.chatbot.pkg.state.State;
import com.greenapi.client.pkg.models.notifications.MessageWebhook;
import com.greenapi.demoChatbot.util.YmlReader;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
Expand Down

0 comments on commit 8150d79

Please sign in to comment.