This telegram bot intends to promote information about cardiology.
To build the server proceed with the following steps:
- Clone this repo to your local machine with the command:
git clone https://github.com/almax07082005/cardioTelegramBot.git
. - Add
hidden.properties
file toresources
folder with necessary content andspring.datasource
variables in order to set up database credentials. - Add
.env
file to root folder withPOSTGRES_USER
andPOSTGRES_PASSWORD
variables forcompose.yaml
file. - Start your application with
startDockerImage
gradle custom task.
- Create new bot through BotFather.
- Set commands there as well.
- Change
telegram.bot.token
variable inhidden.properties
file. - Change all necessary variables in
application.yml
file. - Change link to the bot in GitHub repository page.
- Add name of the button to
Buttons
enum. - Create private method with
Runnable
structure inButton
class. - Put new element in HashMap for
BotService
to be able to call this method. - Do not forget to create this button on the front side, if you need.
- Add name of the button to
Commands
enum. - Create private method with
Runnable
structure inCommand
class. - Put new element in HashMap for
BotService
to be able to call this method. - Do not forget to add this command through BotFather, if you need.