JTeleBot

A Java library for Telegram Bot API

License

License

Categories

Categories

Java Languages
GroupId

GroupId

me.shib.java.lib
ArtifactId

ArtifactId

jtelebot
Last Version

Last Version

2.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

JTeleBot
A Java library for Telegram Bot API
Project URL

Project URL

https://github.com/shibme/jtelebot
Source Code Management

Source Code Management

https://github.com/shibme/jtelebot

Download jtelebot

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
me.shib.java.lib : restiny jar 0.1.5
me.shib.java.lib : utils jar 0.0.1

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
2.1.2
2.1.1
2.1.0
2.0
1.0.1
1.0
0.9.1
0.9
0.8.4
0.8.3
0.8.2
0.8.1
0.8