Telegram Bot - Java API

A Java library for Telegram Bot API

License

License

Categories

Categories

Java Languages
GroupId

GroupId

me.shib.java.lib
ArtifactId

ArtifactId

telegram-bot-java
Last Version

Last Version

1.3.7
Release Date

Release Date

Type

Type

jar
Description

Description

Telegram Bot - Java API
A Java library for Telegram Bot API
Project URL

Project URL

https://github.com/shibme/telegram-bot-java
Source Code Management

Source Code Management

https://github.com/shibme/telegram-bot-java

Download telegram-bot-java

How to add to project

<!-- https://jarcasting.com/artifacts/me.shib.java.lib/telegram-bot-java/ -->
<dependency>
    <groupId>me.shib.java.lib</groupId>
    <artifactId>telegram-bot-java</artifactId>
    <version>1.3.7</version>
</dependency>
// https://jarcasting.com/artifacts/me.shib.java.lib/telegram-bot-java/
implementation 'me.shib.java.lib:telegram-bot-java:1.3.7'
// https://jarcasting.com/artifacts/me.shib.java.lib/telegram-bot-java/
implementation ("me.shib.java.lib:telegram-bot-java:1.3.7")
'me.shib.java.lib:telegram-bot-java:jar:1.3.7'
<dependency org="me.shib.java.lib" name="telegram-bot-java" rev="1.3.7">
  <artifact name="telegram-bot-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='me.shib.java.lib', module='telegram-bot-java', version='1.3.7')
)
libraryDependencies += "me.shib.java.lib" % "telegram-bot-java" % "1.3.7"
[me.shib.java.lib/telegram-bot-java "1.3.7"]

Dependencies

compile (1)

Group / Artifact Type Version
me.shib.java.lib : rest-client-java jar 0.3.9

Project Modules

There are no modules declared in this project.

JTeleBot

Build Status Dependency Status Download Percentage of issues still open

A Java library for Telegram Bot API

Maven Dependency for Consumers

Add to your pom.xml

<dependency>
	<groupId>me.shib.java.lib</groupId>
	<artifactId>jtelebot</artifactId>
	<version>2.1.2</version>
</dependency>

Example

Start by creating an instance of the me.shib.java.lib.jtelebot.TelegramBot with the API token you get from @BotFather

TelegramBot bot = TelegramBot.getInstance("YourBotApiTokenGoesHere");
Update[] updates;
while((updates = bot.getUpdates()) != null) {
    for (Update update : updates) {
        Message message = update.getMessage();
        if(message != null) {
            bot.sendMessage(new ChatId(message.getChat().getId()), "This is a reply from the bot! :)");
        }
    }
}

Versions

Version
1.3.7
1.3.6
1.3.5
1.3.4
1.3.3
1.3.1
1.3.0
1.2.0
1.1.2
1.1.1
1.1.0
1.0.5
1.0.4
1.0.3
1.0.2