Skip to content

igabaydulin/telegram-spring-boot-example

Repository files navigation

telegram-spring-boot-example Version Version Version Version

The only purpose of this bot is to reply "ping" to the received message

TLDR

./gradlew clean build

java -jar build/libs/telegram-spring-boot-example-0.1.jar \
--spring.config.location=classpath:credentials.yaml \
--spring.config.location=classpath:proxy.yaml

Configuration Properties

  • Credentials (example):
    telegram:
      bot:
        credentials:
          token: "<put your bot's token here>"
          bot-username: "<put your bot's username here>"
  • Proxy (example)
    telegram:
      bot:
        proxy:
          enabled: true
          type: "<put proxy type here: {NO_PROXY, HTTP, SOCKS4, SOCKS5}>"
          host: "<put proxy host here>"
          port: "<put proxy port here>"

Building a Jar

./gradlew clean build

Output: ./build/libs/telegram-spring-boot-example-0.1.jar

Execute Jar

java -jar build/libs/telegram-spring-boot-example-0.1.jar \
--spring.config.location=classpath:credentials.yaml \
--spring.config.location=classpath:proxy.yaml