GitHub - yevhensco/tele-bot: My telegram bots · GitHub
Skip to content

yevhensco/tele-bot

Repository files navigation

This is a basic implementation of long polling Telegram bots.

Run in IDE

  1. Add your bot credentials to application.yml or dev profiles

    telebot:
      adminUserNames: ## List of usernames with cannot be banned
        - shevchenco
      firstBot:
        name:
        token:
    
  2. Run as SpringBoot servise. NOTE: service is not listening to any port by default.

Build and run in Docker

  1. Build image with gradle:
./gradlew clean buildImage
  1. Setup docker-compose environment values or set it in .env file:
services:
  bot:
    image: bot:latest
    container_name: tele-bot
    environment:
      TELEBOT_FIRSTBOT_TOKEN: ${TELEBOT_FIRSTBOT_TOKEN}
      TELEBOT_FIRSTBOT_NAME: ${TELEBOT_FIRSTBOT_NAME}
      TELEBOT_FIRSTBOT_REPLYTOUNKNOWNMESSAGES: true
      TELEBOT_FIRSTBOT_BANTIMEOUT: 60-600
    restart: always
  1. Start service:
docker-compose up -d --build --force-recreate

About

My telegram bots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors