Giter Site home page Giter Site logo

prog-ape / tdlight-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tdlight-team/tdlight-java

0.0 0.0 0.0 4.18 MB

Complete Bot and Userbot Telegram library based on TDLib

Home Page: https://t.me/TDLight

License: GNU Lesser General Public License v3.0

Shell 0.61% Java 99.39%

tdlight-java's Introduction

TDLight logo

TDLight Java

Complete Bot and Userbot Telegram library written in Java, based on TDLib

Maven package Release JProfiler

๐Ÿ’ป Supported platforms

Java versions: from Java 17 to Java 19+ (Legacy Java 8+ support with tdlight-java-8)

Operating systems: Linux, Windows, MacOS

CPU architectures:

  • i386/x86 (Linux, Windows)
  • amd64/x86_64 (Linux, Windows, OSX)
  • armhf/armv7 (Linux)
  • aarch64/armv8/arm64 (Linux)
  • s390x (Linux)
  • ppc64el/ppc64le (Linux)

๐Ÿ“š Required libraries

Install OpenSSL on macOS

You must install openssl@3 using the brew package manager , then link openssl to /usr/local/opt/openssl

If you don't know how to do this, type the following commands in your terminal:

brew install openssl@3
ln -sf /usr/local/Cellar/openssl@3/3.0.0 /usr/local/opt/openssl

๐Ÿ“š How to use the library

Setting up the library using Maven

If you are using Maven, edit your pom.xml file as below:

<project>
	<repositories>

		<!-- Add the following repository -->
		<repository>
			<id>mchv</id>
			<name>MCHV Apache Maven Packages</name>
			<url>https://mvn.mchv.eu/repository/mchv/</url>
		</repository>

	</repositories>

	<dependencyManagement>
		<dependencies>
			
			<!-- Add the following dependency -->
			<dependency>
				<groupId>it.tdlight</groupId>
				<artifactId>tdlight-java-bom</artifactId>
				<version>VERSION</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>

		<!-- Add the following dependencies -->
		<dependency>
			<groupId>it.tdlight</groupId>
			<artifactId>tdlight-java</artifactId> <!-- Use tdlight-java-8 if you are using java 8 to 16 -->
			<!-- don't specify the version here -->
		</dependency>
		<dependency>
			<groupId>it.tdlight</groupId>
			<artifactId>tdlight-natives-linux-amd64</artifactId>
			<!-- don't specify the version here -->
		</dependency>
		<!-- Include other native versions that you want, for example for windows, osx, ... -->

	</dependencies>
</project>

Replace VERSION with the latest release version, you can find it here.

Setting up the library using Gradle

If you are using Gradle, add the following lines into your build.gradle file

repositories {
	maven { url "https://mvn.mchv.eu/repository/mchv/" }
}
dependencies {
	// import the BOM
	implementation platform('it.tdlight:tdlight-java-bom:VERSION')

	// do not specify the versions on the dependencies below!
	implementation 'it.tdlight:tdlight-java' // Use tdlight-java-8 if you are using java 8 to 16
	implementation 'it.tdlight:tdlight-natives-linux-amd64'
	// Include other native versions that you want, for example for windows, osx, ...
}

Replace VERSION with the latest release version, you can find it here.

โš’ Native dependencies

To use TDLight Java you need to include one or more native dependencies:

  • tdlight-natives-linux-amd64
  • tdlight-natives-linux-aarch64
  • tdlight-natives-linux-x86
  • tdlight-natives-linux-armhf
  • tdlight-natives-linux-ppc64le
  • tdlight-natives-linux-s390x
  • tdlight-natives-windows-amd64
  • tdlight-natives-osx-amd64

Usage

An example on how to use TDLight Java can be found here: Example.java

Advanced usage

If you want to disable the automatic runtime shutdown hook, you should set the property it.tdlight.enableShutdownHooks to false

TDLight methods documentation

TdApi JavaDoc

TDLight extended features

TDLight has some extended features compared to TDLib, that you can see on the TDLight official repository.

About

License

TDLight is licensed by Andrea Cavalli [email protected] under the terms of the GNU Lesser General Public License 3

Libraries licenses

JTDLib is licensed by Ernesto Castellotti [email protected] under the terms of the GNU Lesser General Public License 3

TDLib is licensed by Aliaksei Levin [email protected] and Arseny Smirnov [email protected] under the terms of the Boost Software License

OpenSSL is licensed under the terms of Apache License v2

Zlib is licensed under the terms of Zlib license

tdlight-java's People

Contributors

cavallium avatar yarmoiseev avatar bildcraft1 avatar dhina17 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.