Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/motoki317/traq-ws-bot4j
- Owner: motoki317
- License: mit
- Created: 2021-11-01T15:49:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-21T02:34:29.000Z (over 2 years ago)
- Last Synced: 2024-07-09T10:04:02.340Z (4 months ago)
- Topics: traq
- Language: Java
- Homepage:
- Size: 1.14 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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();
}
}
```