Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/motoki317/traq-ws-bot4j

traQ WebSocket bot library for Java
https://github.com/motoki317/traq-ws-bot4j

traq

Last synced: 3 months ago
JSON representation

traQ WebSocket bot library for Java

Awesome Lists containing this project

README

        

# traq-ws-bot4j

[![GitHub release](https://img.shields.io/github/release/motoki317/traq-ws-bot4j.svg)](https://GitHub.com/motoki317/traq-ws-bot4j/releases/)

[traQ](https://github.com/traPtitech/traQ) WebSocket bot library for Java

Requires Java 17+

## Example usage

### pom.xml

Make sure to use the latest version shown below.

- traq4j
[![GitHub release](https://img.shields.io/github/release/motoki317/traq4j.svg)](https://GitHub.com/motoki317/traq4j/releases/)
- traq-ws-bot4j
[![GitHub release](https://img.shields.io/github/release/motoki317/traq-ws-bot4j.svg)](https://GitHub.com/motoki317/traq-ws-bot4j/releases/)

```xml



GitHub traq4j
https://raw.github.com/motoki317/traq4j/mvn-repo/


GitHub traq-ws-bot4j
https://raw.github.com/motoki317/traq-ws-bot4j/mvn-repo/




com.github.motoki317
traq4j
${traq4j.version}


com.github.motoki317
traq-ws-bot4j
${traq-ws-bot4j.version}

```

### Code

```java
public class Main {
public static void main(String[] args){
Bot bot = new Bot("accessToken", "https://q.trap.jp/api/v3", true);
bot.onEvent(Event.MESSAGE_CREATED, MessageCreatedEvent.class, (e) -> {
// do something...
});
bot.start();
}
}
```