GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - synyx/java-matrix-bot-lib: A small Java library to aid in creating a matrix chat bot

BranchesTags
Open more actions menu

Latest commit

 

History

106 Commits
106 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
gradle/wrapper
gradle/wrapper
 
 
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Java Matrix Bot Lib

A Java library for communicating with a Matrix server, meant to aid in creating a chatbot.

Usage

Currently requires at least JDK 21. If you are using Maven, add the following repository to your pom.xml to add java-matrix-bot-lib as a dependency:

<dependency>
    <groupId>org.synyx</groupId>
    <artifactId>java-matrix-bot-lib</artifactId>
    <version>VERSIONHERE</version>
</dependency>

Example

public class MyMatrixBot implements MatrixEventConsumer {

  private MatrixClient matrixClient;

  public MyMatrixBot() {

    MatrixClient matrixClient = MatrixClient.create("https://matrix.example.com", "username", "password");
    matrixClient.setPersistedState(matrixStatePersistence);
  }

  public void startBot() {
    // Blocks the thread
    matrixClient.syncContinuous();
  }

  public void stopBot() {

    matrixClient.requestStopOfSync();
  }

  @Override
  public void onMessage(MatrixState state, MatrixMessageEvent event) {
    // ...
  }
}

Development

If you want to develop on the library locally and test out your changes, you can publish it to your maven local like this:

./gradlew -Pversion="dev" publishToMavenLocal

This enables you to use your local development version like this:

<dependency>
    <groupId>org.synyx</groupId>
    <artifactId>java-matrix-bot-lib</artifactId>
    <version>dev</version>
</dependency>

About

A small Java library to aid in creating a matrix chat bot

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.