Code Monkey home page Code Monkey logo

springtelegrambot's Introduction

SpringTelegramBot Test Deploy

This repository contains an example of telegram bot written in Java (11 and above) using Spring Framework.

This project uses https://github.com/rubenlagus/TelegramBots, check it out for more telegram bot implementation details, also https://core.telegram.org/bots/api for telegram bots API details

Current version supports the following commands:

  • /help - Displays help about all or specified command
  • /whoami - Displays information about the person who wrote the command: User Id, Name and chat type
  • /start - The default bot command, shows greeting message

Configuration

Configuration is supplied through Environment Variables:

Environment variable Required Default value Description
TELEGRAM_TOKEN Yes The token from @BotFather
TELEGRAM_USERNAME Yes The username from @BotFather
TELEGRAM_URL Yes The base url on which your bot would listen example: https://mybot.example.com
TELEGRAM_MAX_CONNECTIONS No 40 The Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput
TELEGRAM_LANGUAGE_CODE No en A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
PORT No 9090 The port on which web server will listen for incoming requests

springtelegrambot's People

Contributors

unafraid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.